vector
is in namespace std
, so you need prefix std::
before:
using namespace GS;
typedef std::vector<std::vector<String> >::const_iterator table_iter;
or, to avoid using namespace GS
too:
typedef std::vector<std::vector<GS::String> >::const_iterator table_iter;
But, because you only need vector
from the standard library, you can do that too:
using std::vector;
using namespace GS;
typedef vector<vector<String> >::const_iterator table_iter;
In this way you says to the compiler you want to use vector
from std::
namespace, but not bring all namespace.
But you said you want to avoid using namespace
in your header file. That is usually good idea (including using std::vector
), so the best solution is the second one:
typedef std::vector<std::vector<GS::String> >::const_iterator table_iter;