online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> #include <fstream> //文件读写处理,要包含头文件,f是file的缩写,即文件流。 using namespace std; int main () { ofstream myfile("hello.txt"); //定义了一个输出流文件类型(ofstream)的变量myfile,指向hello.txt文本文件 myfile<<"helloworld"; //用”<<“来把数据输出到myfile,myfile在内存中开了一块缓冲区 return 0; //正常有个myfile.close()的语句,不写程序结束时也会自动关闭文件。 }
helloworld

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text
×

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue