Online compiler

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Post Reply
Message
Author
User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

Online compiler

#1 Post 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;
}
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

User avatar
Pizzasgood
Posts: 6183
Joined: Wed 04 May 2005, 20:28
Location: Knoxville, TN, USA

#2 Post 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).
[size=75]Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib[/size]
[img]http://www.browserloadofcoolness.com/sig.png[/img]

User avatar
tronkel
Posts: 1116
Joined: Fri 30 Sep 2005, 11:27
Location: Vienna Austria
Contact:

#3 Post 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.
Life is too short to spend it in front of a computer

Post Reply