⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 11_23_1.cpp

📁 c++案例教程源代码
💻 CPP
字号:
#include <iostream>
#include <fstream> 
using namespace std; 
int main() 
{	ofstream ofile("test"); 		//创建test文件,并以文本输出方式打开
	if(!ofile) 	{ 	cout << "Cannot open file.\n"; 		return 1;	} 
	ofile << 10 << " " << 123.23 << "\n"; //输出到文件
	ofile << "This program is designed by zrf and ssh!."; 
	ofile.close(); 				//关闭文件
	return 0; 
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -