我不能在课堂上执行 typedef 吗?
#include <vector>
using namespace std;
class List {
public:
typedef int Data;
class iterator;
pair<iterator,bool> insert(const Data nodeId); //<-error
private:
class Node {
typedef vector<NodeId> DepList;//<-error
};
}
我收到一个错误missing type specifier - int assumed. Note: C++ does not support default-int