online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
// Example program #include <iostream> #include <string.h> using namespace std; char* strcat_m(char *str_dest,char *str_src) { char *new_str = new char[strlen(str_dest)+strlen(str_src)+1]; strcpy(new_str,""); strcat(new_str,str_dest); strcat(new_str,str_src); return new_str; }; int main() { char * first = "Hello"; char * second = "World"; char * temp = new char[strlen(first)+1]; strcpy(temp,first); delete [] first; first = new char[strlen(temp)+1]; first = strcat_m(temp,second); cout << first; }

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