Can one write a program in C++ and somehow make it run by someone else directly on the web, from a browser, without the other person having to download the .exe?
3 Answers
A few days ago I would've downvoted this to oblivion and left an unhelpful comment about how little sense that made. Yesterday, however, I read an article on /r/programming which has led me to now consider your question perfectly valid :). The technology is called Native Client (NaCl):
Native Client (NaCl for short) is a Chrome specific technology that allows developers to code in C/C++ and produce a .nexe file, a compiled native module. These run inside the NaCl sandbox in Chrome.
The article in question is here and is about browser game development, mainly using HTML5.
2 Comments
I suppose it depends on how complex a program you're talking about.
If you're referring to console applications which don't take too long to run, you can always use http://ideone.com/. For example: http://ideone.com/sGw5F
Comments
You should look into Native Client. From http://code.google.com/p/nativeclient/:
Native Client is an open-source technology that allows you to build web applications that seamlessly execute native compiled code inside the browser. This Google Code project is for maintaining the Native Client implementation, including compiler and browser support. If you're writing a compiler, are interested in porting Native Client to a new browser, or are researching the security mechanisms underlying Native Client, you can find useful resources in this project.