Page 1 of 1

Online compiler

Posted: Wed 14 Apr 2010, 15:50
by Lobster
Online compiler for C, C++, tcl, python etc
tried the enclosed c - think I provided a link to something similar :)

http://codepad.org/

example code

Code: Select all

/* Example C program */

int main()

{ int i;
for (i = 0; i < 50000; i++)
{
printf ("%d",i);
printf (" Puppy is Great\n");
}
return 0;
}

Posted: Thu 15 Apr 2010, 20:13
by Pizzasgood
Cool. That could be pretty useful in certain circumstances. Especially for people who want to help other people with their code, or test algorithms, and don't have immediate access to a proper development environment (maybe they are on the road or visiting a friend or using a cell-phone).

Posted: Fri 16 Apr 2010, 12:44
by tronkel
It won't replace a normal local compiler/debugger.

I tried it yesterday but only superficially with C++

I does not seem to be able to handle a situation where the program needs to suspend while it receives user input. e.g.
#include <iostream>
#include <string>

using namespace std;

int main()
{

string name="";
cout << "What is your name" << endl;
getline(cin,name);

if(name=="Jack")
cout << "Welcome " << name << endl;
else
cout << "You're an impostor" << endl;

return 0;

}
The program will not pause at the getline statement so that the user can input his name. The output at the server is broken simply because because it has never received it.