I am trying to compile some C++ code (which can be compiled with Visual Studio 2012 on Windows) with g++-4.4
.
I have this snippet of code,
const std::string cnw::restoreSession(const std::vector<string> &inNwsFile) {
for (std::string &nwFile : inNwsFile){
// some...
}
}
that I cannot compile because of this error:
CNWController.cpp:154: error: expected initializer before ‘:’ token
Can you give me some advise on how to solve this problem?