Dolphin
Dolphin

Reputation: 343

Embedding C compiler to a webpage

I am developing a site for online C coding competition. The coding will be done in an editor that will be embedded in the webpage, and this must also be able to compile the program online. Is there any available compiler that can be embedded in the webpage? The server can be either linux or windows server. If anyone has any idea please share.

Upvotes: 5

Views: 3270

Answers (1)

Waleed Amjad
Waleed Amjad

Reputation: 6808

Well, you can always write a script that invokes an installed compiler through system() commands. Although you want to be very, very careful as this can be very dangerous. For example if you do not sanitize your input, then someone could inject commands which intentionally crash/damage your system.

Upvotes: 6

Related Questions