how i embed a program (c++) on a website

March 27, 2010 at 15:07:07
Specs: Windows Vista
Hi, this is my 1st message, so please bear with me and sorry for any mistakes.
I am trying to embed a program written in c++ on a website made in microsoft publisher, the insert object thing doesn't work because it won't show up on the actual website. Can someone please tell me how, I don't know how to script in java or html, just c++.

See More: how i embed a program (c++) on a website

Report •


#1
March 27, 2010 at 16:41:40
You are going about it the wrong way. C++ is not a scripting language, it is full blown programming language. The code does nothing until it is compiled into an executable. You cannot embed an executable into a Web page and expect it to run, it just wont happen.

That's why scripting languages like Java, HTML, Perl and PHP were invented for. You need to be using one of them if you want something the execute on a web page.

Stuart


Report •

#2
March 27, 2010 at 16:55:24
Oh, i see :(
Thanks, but one more thing, is there a way of translating the script into java or is it doomed to not be embeded?

There is no spoon, I couldn't be bothered to upload one.


Report •

#3
March 27, 2010 at 17:13:56
There is no easy way to translate C++ code into Java. There are many similarities between C++ and Java but you are going to have to learn Java and re-write the code if you want it on a web site.

Stuart


Report •

Related Solutions

#4
March 27, 2010 at 17:30:58
Contrary to popular belief, it is possible to have a "script"
written in C++, though I use the term "script" in the loosest
possible way. A script written in a "traditional" web language
such as perl is just a program that takes some input, or some
command-line parameters, and produces some HTTP/HTML
output which is then sent by the web server to the client
browser. There is nothing stopping this script from being a
fully compiled C++ program. But you don't embed it in a web
page, like you do with PHP scripts. You run it as a CGI script
by putting it in a special directory that the web server is
configured with.

Alternatively, you can write C++/CLI (managed C++ producing
.NET assemblies) and embed it into an ASP.NET page.

In both cases, the subject is far from easy to explain and you
need to read a book on it.


Report •

#5
March 28, 2010 at 10:25:08
Its okay, i just accidently used the word script incorrectly, i know what it means. the program an executable program file, i was just wondering if anyone could reccomend any good c++ to java translators

There is no spoon, I couldn't be bothered to upload one.


Report •

Ask Question