指定了多个存储类

时间:2013-02-27 21:05:53

标签: c++ map unordered

我试图在int main之前创建两种不同的方法来存储数据。我有一张无序的地图,只有一张普通的地图。我收到了错误,指定了多个存储类..

我只是想知道为什么C ++不允许这样做?

typedef struct dictionary{ 
 std::string word; 
unsigned char hash[20]; 

 std::string hex;
 int number;
 } a_dictionary;


 typedef struct brute{
int entry;
string secWord;
string secHex;
}

typedef std::unordered_map<std::string, dictionary*> Mymap;
typedef std::map<int, brute*> Solved;
int _tmain(int argc, _TCHAR* argv[])
{
string option;
string pass;
int choice=0;

Solved solution;
Mymap c1;

错误C2159:指定了多个存储类  错误C2146:语法错误:缺少';'在标识符'Mymap'之前  错误C4430:缺少类型说明符 - 假定为int。注意:C ++不支持default-int  错误C2146:语法错误:缺少';'在标识符'c1'之前  错误C2065:'c1':未声明的标识符

错误C2159:指定了多个存储类

0 个答案:

没有答案