.h 文件出错 error C2501: 'list' : missing storage-class or type specifiers
graph.h头文件#include<iostream>#include<list>在图邻接表表示时,使用的c++ 标准库的listlist<int>* HeadNodes;使用主函数引用#include."graph.h"时,提示出错上面显示行 error C2501: 'list' : missing storage-clas...
·
graph.h头文件
#include<iostream>
#include<list>
在图邻接表表示时,使用的c++ 标准库的list
list<int>* HeadNodes;
使用主函数引用#include."graph.h"
时,提示出错
上面显示行 error C2501: 'list' : missing storage-class or type specifiers
修改意见: std::list<int>* HeadNodes;
引文头文件一般不用using namespace std, 所以使用就在该语句前面加上。
更多推荐

所有评论(0)