这就是我想要完成的事情,我想创建一个用户定义的项目结构,然后使用项目名称作为键将其存储在地图中。我可能是一个菜鸟,但有人可以告诉我我做错了什么,当我尝试编译程序时,它会吐出一堆奇怪的输出,所以看起来它不起作用,我该怎么办?
map<project, string> provec;
project current;
cout << "Enter your project name: ";
current.proname = getFileContents(cin);
cout << "Enter a description: ";
current.prodesc = getFileContents(cin);
cout << "How long until deadline: ";
current.protime = getFileContents(cin);
provec.insert(pair<project, string> ( current, current.proname ));
cout << endl << "You created a new project: " << current.proname
<< endl << "Project description: " << current.prodesc ;