1 2 3 4 5 6 7 8 9 10 11 |
#include <iostream> #include <fstream> using namespace std ; void main () { char * p= "SysProgram" ; ofstream tfile ("C: // 1.txt" ); tfile . write (p, strlen (p)); //写入内容 } |
转载请注明:exchen's blog » ofstream 写文件