Hi,

I have written a c++ program which takes a word and prints a list of all possible words that can be formed from it. I want to create a .exe file which can serve this purpose for me. By that I mean, I don't want to always compile and run the program to use this application. I want to use it like a separate tool (just like we use separate calculator etc.) in windows. Is it posible to do that ?

Thanks

I don't get your question ...

Actually an executable file is called a stand-alone application ...
So you CAN use it as a stand-alone application ...

No man, I am using VS 2008 and the executable file does not run by itself. Even if i use it, it runs and then after entering the input, it vanishes instantaneously. However, from command prompt it works.

No man, I am using VS 2008 and the executable file does not run by itself. Even if i use it, it runs and then after entering the input, it vanishes instantaneously. However, from command prompt it works.

Add cin.get(); at the end of your application ...

Without getting into details. When you compile your code, the compailer (most compailers) give you 2 exe files. The one in the "Debug" folder, and another one in the "Release" folder. You need the exe file from the "Release" folder.


Oh, OK I just read tux's comment. Yeah, that is a different kind of problem.

cin.ignore( 1, '\n' );
cin.get();

Try cin.ignore if cin.get() doesn't work by itself. Or flush the ostream, by putting "endl" in your output.

Hi,

Tux4life:

Thanks man, that worked !

BevoX:

There is no release folder. I am using Visual Studio 2008.

Click on Build, then select Configuration Manager. A window will pop up, then under the "Active solution configuration" roll down the menu and select "Release". Then compile your code again, and you will have a "portable" stand alone app.

Then compile your code again, and you will have a "portable" stand alone app.

which will only run on PC's with .NET framework 2.0

which will only run on PC's with .NET framework 2.0

Wrong !
In Microsoft Visual C++ 2008 you've the choice between a stand-alone application or one which relies on .NET ...

Look at this video: http://msdn.microsoft.com/en-gb/beginner/bb964629.aspx

Edit:: Sorry I didn't read the post carefully before I replied ...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.