I am trying to define a vector of string in Visual C++ 2005 like this:
void main()
{
typedef vector<std::string> temp;
But, I am getting an error:
error C4430: missing type specifier - int assumed
I have included string.h
What could be the reason?
Am I doing anything wrong?
If you are
using namespace std;you have to saytypedef vector<string> temp;or saytypedef vector<::std::string> temp;because within the namespace std there can also be a sub-namespace with the name std.