我刚刚在unix中写了一个cpp文件。 我有一堆使用嵌套模板参数的代码。 例如:在unix中编译C++时嵌套模板参数出错
void showAlb(map<string, vector<string>> mapArt, map<string, vector<string>> mapSong, vector<string> artists, int artnumb);
不过,我总是得到错误 `
error: ?>?should be ? >?within a nested template argument list
`
void showAlb(map<string, vector<string>> mapArt, map<string, vector<string>> mapSong, vector<string> artists, int artnumb);`
^
我怎样才能解决呢?
正如答案中所提到的,您可能会喜欢使用C++ 11。假设最近有足够的g ++版本,可以通过在编译命令行中添加-std = C++ 11来编译使用C++ 11规则。 – md5i