My C++ is a bit rusty so...
#include<list>
typedef list<int> foo;
that gives me the oh so nice error message:
test.cpp:2: syntax error before `;' token
What the heck can I even Google for in that...
The names of the C++ Standard library are in namespace std
#include <list>
typedef std::list<int> foo;
You are expecting the list to be in global namespace. But is defined inside std namespace. Hence either you should use using namespace std; or expliictly specify the namespace as std::list; I personally prefer the second option.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With