Author
anonymous
over 4 years ago
Language
C++
Compiler
gcc 4.9.2
Options
Warnings
Don't Use Boost
Compiler Default
no pedantic
Author
anonymous
over 4 years ago
$ g++ prog.cc -Wall -Wextra
prog.cc: In function 'void func()':
prog.cc:7:12: error: 'std::map<std::pair<unsigned int, long unsigned int>, std::pair<int, int> > myMap()' cannot appear in a constant-expression
vector<myMap::value_type> mapVector();
^
prog.cc:7:29: error: template argument 1 is invalid
vector<myMap::value_type> mapVector();
^
prog.cc:7:29: error: template argument 2 is invalid
prog.cc:7:42: error: invalid type in declaration before ';' token
vector<myMap::value_type> mapVector();
^
prog.cc:9:9: error: 'myMap' is not a class or namespace
for(myMap::iterator it = myMap.begin(); it != myMap.end(); it++)
^
prog.cc:9:45: error: 'it' was not declared in this scope
for(myMap::iterator it = myMap.begin(); it != myMap.end(); it++)
^
prog.cc:9:57: error: request for member 'end' in 'myMap', which is of non-class type 'std::map<std::pair<unsigned int, long unsigned int>, std::pair<int, int> >()'
for(myMap::iterator it = myMap.begin(); it != myMap.end(); it++)
^
prog.cc:12:23: error: request for member 'push_back' in 'mapVector', which is of non-class type 'int()'
mapVector.push_back(*it);
^
Exit Code:
1