1.C++读取txt文本数据
ifstream infile; string num; int x; infile.open("xxx.txt"); while(infile>>num) { x = atoi(num.c_str()); }
时间: 2024-09-30 18:50:12
1.C++读取txt文本数据
ifstream infile; string num; int x; infile.open("xxx.txt"); while(infile>>num) { x = atoi(num.c_str()); }