如何按指定内容查找txt文件里的内容并显示
您能举个小例子吗?
string str; ifstream infile("1.txt"); while(!infile.eof()){ getline(infile,str); strstr(str.c_str(),"cc"); }
我是新手,看不懂,麻烦您能给写个简单的么?谢谢啦
读取文件内容你会吗
只会最简单的把文件中所有内容显示到屏幕上