#include <iostream> #include <fstream> using namespace std; int main(int argc, char** argv) { char data[100]; ifstream infile; infile.open("me.txt"); cout<<"读取内容"<<endl; for(int i=0;i<6;i++){ infile>>data; cout<<data<<endl; } infile.close(); return 0; }
标签:文件,cout,int,char,include,data,infile From: https://www.cnblogs.com/As198601/p/16748224.html