The quick answer is: no, you cannot.
C ++ applications cannot be embedded in a web page, they must be downloaded, and the user must run them on the client machine.
Details: it is somehow possible, but it is absolutely not portable in browsers . For example, Internet Explorer has ActiveX components (they can be a C ++ application, it will be downloaded, installed and launched on a web page). Other browsers have another mechanism to achieve this (e.g. Chrome has a Native Client ), but you cannot write something really portable, and you will have many limitations that you will use.
source share