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…
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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 asstd::list;I personally prefer the second option.