#include <iostream>
#include <fstream>
using namespace std ;
void main ()
{
char * p= "SysProgram" ;
ofstream tfile ("C: // 1.txt" );
tfile . write (p, strlen (p)); //写入内容
}
#include <fstream>
using namespace std ;
void main ()
{
char * p= "SysProgram" ;
ofstream tfile ("C: // 1.txt" );
tfile . write (p, strlen (p)); //写入内容
}
C++代码:将字符串写入文件的示例
3万+

被折叠的 条评论
为什么被折叠?



