@zzzxxxyyy
2018-07-30T02:32:48.000000Z
字数 402
阅读 1012
c++
define:提供输入和输出功能
#include <iostream>
int v1,v2;
cout << "the sum of v1 and v2 is ";
cout << v1+v2;
cout endl
endl : 插入一个换行符,刷新缓冲区
#include <iostream>
#include <string>
string filename;
cout << "enter a filename"
cin >> filename ;
#include <fstream>
ofstream outfile("filename")
if (!outfile)
cerr<< "we can't open the file!"