0

i am working on a project which requires my c++ based code to run in a web page. taking the simplest example of "hello world" code in c++, is it possible to link this code to an html document, any help would be appreciated.

Scripting constraints: html/php/asp.net (asp.net only if this is not at all possible with html/php)

2 Answers2

1

Actually, yes - provided your users are using chrome:

https://developer.chrome.com/native-client

Richard Hodges
  • 68,278
  • 7
  • 90
  • 142
0

Hacky, but working with yor constraints, is to make this "hello world" program output the whole html, and use it as a cgi. Or use php or asp to call this exec and redirect its output.

But this is not having the source code embedded in the html, like php does, but compiling the C++ to an executable and calling it from php. You can even extend php with c++.

Community
  • 1
  • 1
Alessandro Pezzato
  • 8,603
  • 5
  • 45
  • 63