学生成绩管理程序c++

能读入外部提供的包含学生成绩的文本文件;
能在程序中录入学生成绩信息,并将信息写入文本文件。

第1个回答  2016-08-29
可以,你看看这个例子,其实文件跟cout和cin是一样的

void ReadConfig()
{
std::map<std::string, double> config;
std::string str;
double t;
std::ifstream configin("config.txt");
if (!configin)
{
std::cout << "config.txt" << std::endl;
exit(1);
}
while (configin >> str)
{
if (str == "//")
getline(configin, str);
else
{
configin >> t;
config[str] = t;
}
}
第2个回答  2016-08-29
fstream头文件里提供文件读写功能
第3个回答  2016-08-29
楼上说了fstream
第4个回答  2016-08-30
可以帮你做一份.
第5个回答  2016-08-29
说下你的设计学生成绩管理程序c++和要求.追问

其他的都无所谓,有一些基本功能就行了。主要是那两点要做到

相似回答