第十五章,读取txt文件(C++)

#include <iostream>
#include <fstream> 

int main(int argc, char** argv) {
	
	std::ifstream in("e:\\123.txt",std::ifstream::in);  
	
	char cs[1024];   
    while(in>>cs){  
        std::cout<<cs<<std::endl;  
    }  
    in.close(); 
	
	return 0;
}
调试截图


posted @ 2017-06-26 11:33  yangykaifa  阅读(163)  评论(0编辑  收藏  举报