c++ and html? help!

closed account (EAUX92yv)
hi I am learning html and i know quite a bit of c++. I want to know if there is a way I can display a game made in c++ in an html website. Thanks in advance.
Do you mean like to download it, or just to view it like a flash game?
you can't view it on the site but you can put it up for download
No offense, but what do you mean by "[you] know quite a bit of c++?"

As you should know, C++ must be compiled before it can execute. C++ compilers, ultimately compile the source code (C++) into machine code (binary information), or something directly executable by the target OS. How would you propose to take a native executable meant for a particular hardware configuration, and run it on a webpage, on multiple and likely differently configured machines?

I suppose another route might be to compile your C++ code into something more portable, but C++ isn't designed for that. It makes some assumptions that would make this difficult. Perhaps you want a syntactically similar, but fundamentally different language, something like Java...?
I did google your question and surprisingly Google Chrome has Native Client @.@

First, we’re pleased to announce the integration of Native Client into Chrome. Native Client allows C and C++ code to be seamlessly executed inside the browser with security restrictions similar to JavaScript. Native Client apps use Pepper, a set of interfaces that provide C and C++ bindings to the capabilities of HTML5. As a result, developers can now leverage their native code libraries and expertise to deliver portable, high performance web apps.


check it out at https://developers.google.com/native-client/

Not sure if that is what you are looking for.
Perhaps you want a syntactically similar, but fundamentally different language, something like Java...?


Or maybe Javascript is another possibility - that works together with HTML very nicely.

As for the C++, images showing screen captures from the game could be shown on a website, but not the actual playable game, other than as a download.
What TNTXTNT said sounds interesting, has anyone tried it out yet on Chrome? Anybody happy or disgusted with how it works?
i havent but it sounds amazing that would get me to switch from firefox to chrome and also whoever suggested javascript that isnt a good idea
closed account (EAUX92yv)
I am trying to make a website in which free to play games may be played in the browser. Once again, any help is appreciated.

find a c++ to php or java convertorr
closed account (EAUX92yv)
Thanks for the idea of a c++ or java converot, Aramil of Elixia. It sounds like it will work.
Last edited on
Hey, I'm looking for an update here, has anyone tried Chrome's C++ abilities out yet? I'm still too much of a noob to attempt it and I don't use chrome so...
damn it i forgot all about that. ill try it tonight and give a review tomorrow.
Topic archived. No new replies allowed.