online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> #include <cstring> #include <fstream> using namespace std; int main() { ifstream i1("input1.txt", ios::in); ifstream i2("input2.txt", ios::in); if ( !i1.good() || !i2.good() ) { cout<<"Error abriendo los archivos"<<endl; return 1; } char line1[100], line2[100]; int sz1, sz2; int line = 0; while( i1.getline(line1, 100) ){ int search = 0; if( i2.getline(line2, 100) ){ if(strcmp(line1, line2)){ sz1 = strlen(line1); sz2 = strlen(line2); int colum = -1; for(int i=0; i<sz1 && i<sz2 && colum==-1; i++){ if(line1[i] != line2[i]) colum = i; } if(colum == -1){ colum = sz1; if(sz1 >= sz2) colum = sz2; } cout<<"Diferencia en la linea y columna: ("<<line<<", "<<colum<<")"<<endl; } search = 1; } if( !search ){ cout<<"Diferencia en la linea y columna: ("<<line<<", 0)"<<endl; } line++; } return 0; }

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