online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <iostream> #include <fstream> #include <string> using namespace std; int main () { string line; int num[10]; ifstream myfile ("numbers.txt"); if (myfile.is_open()) { for(int i=0; i<6; i++) myfile>>num[i]; myfile.close(); } else cout << "Unable to open file"; for(int i=0; i<6; i++) cout<<num[i]<<" "; return 0; }
1 2 3 4 5 6

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text



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