Creating an exe using another exe

R

Ricky Koh

Hi. I wanted to know if it is possible to create an exe by using
another exe created by C++? If it is possible, are there any examples
out there?
 
A

Artie Gold

Ricky said:
Hi. I wanted to know if it is possible to create an exe by using
another exe created by C++? If it is possible, are there any examples
out there?

Sure. All you need is a C++ compiler (and probably linker) written in C++.

Now your question about the C++ *language* is....

Cheers,
--ag
 
J

John Harrison

Anchor said:
I want to know the answer ,too.

Executables (or exes) are just files, so of course C++ can create
executables just like any other file. The trick is to know what the format
is for executables files on your system.

A good place to find out about file formats is www.wotsit.org, exe file
format is explained there.

john
 
S

Scott Condit

Joe said:
If you can use a compiler from the command line, you can do this at run-time
with a call to system() or one of the spawn...() functions, or perhaps
fork()/exec...().
None of these are standard C++ though.

system() is, although of course exactly what it does (when called with
a non-null pointer) isn't defined by the standard.

S
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top