Running a Console Application Without a Compiler

This isn’t specifically WindRiver related, but it is about C++. I have just recently started learning C++, and I have written a console application I would like to show someone else on their computer, but they don’t have a Compiler on their computer. Is it possible to run the application without a compiler? And if so, how?

[assuming this is windows]
If you read the build log that your compiler IDE outputs when you compile, it should point you towards a .exe file.

On my PC with Visual Studio 2008, it is:
<my documents>/visual studio 2008/projects/<project name>/debug/<project name>.exe.

You may be able to take that and run it on their computer. First thing to try would be to move it to another directory and run it directly from windows explorer.

There are a bunch of things I can think of that may go wrong, but a simple console app should be fine.

Thanks, I think that is going to work. Now I need to figure out how to get the .exe file onto my flash drive.

Can’t you just locate the .exe file as Bongle said and then drag the file to your flash drive folder?

I found 3 different .exe files, none of which would run when i tried to open them. They were in a file named debug inside the overall program file. When I tried to find the .exe file the compiler gave me using windows explorer, all it did was run the program.

What are the names of the 3 exes? It should be pretty obvious which one you need because it should be named after your project. If I created a project named “MyConsoleApp”, then it should compile a “MyConsoleApp.exe”.

I think I just figured it out, thanks for the help.