标签:style blog class code java c
1. 批量改变文件内容:
//批量改变输出文件内容 #include <fstream> #include <iostream> #include <string> using namespace std; int main(){ ifstream input("D:pos_img.txt"); ofstream output("D:pos_image_o.txt"); string strin,strout; while(input>>strin){ strout ="pos_image/"+strin; strout+=" 1 0 0 40 40"; output<<strout<<endl; } return 0; }
效果如图:
改前 改后
标签:style blog class code java c
原文地址:http://www.cnblogs.com/bestheart/p/3723970.html