I am very good at doing silly mistakes in c++ syntax. Here are two of the most disturbing mistakes.
1. Forgetting to put ; after class declaration :
class mb
{
int a;
}
Error : "expected unqualified-id at end of input"
2. Forgetting to leave a space after ">" in map declaration.
map<string,vector<double>> *a;
1. Forgetting to put ; after class declaration :
class mb
{
int a;
}
Error : "expected unqualified-id at end of input"
2. Forgetting to leave a space after ">" in map declaration.
map<string,vector<double>> *a;
Error : ‘>>’ should be ‘> >’ within a nested template argument list
Correct syntax : map<string,vector<double> > *a;
The second one is more annoying . It made me google many a times :)