anyone please guide me to create a exe program in visual C++ 2005.

Thank you

I already checked that one, it only guide us how to make a program ( how to begin to write the code into the editor), not a exe program. I need a guide to make a real exe file.

To be able to create an Exe file in Visual C++ (I hope by your context you are using 6.0) you need to have fairly good knowledge of C++. next an Exe application can be of two types Console based / Graphical User Interface. For console based you can use Win32 Console APllication (as Ancient Dragon has guided you to the tutorial) and code in the ToDo areas for what operation you want to do. Next compile and build the program. This way u can create a console based exe.

For Graphical based exe you have to learn a bit more of MFC before proceeding.

Please revert back to us in case of more clarification.

Comments
nothing wrong with MFC -- I use it frequently
MFC? Repent!

HAHAHAHA.

What's so "fairly good understanding" about being able to write

int main(char* args, int argv)
{
    return 0;
}

and pressing a button or key?

I need a guide to make a real exe file.

Type all of your code into the visual C++ editor and then press ctrl+shift+b. That builds your project and creates an exe file in the Debug or Release folders of the project folder. You can also do it the clicky way from the Build menu in visual C++. You can also use F5 to build and run in debug mode immediately, or ctrl+F5 to build and run in production mode immediately.

The tutorials that you said weren't helpful describe how to build projects here. But that's probably too much information if all you want is to build simple programs.

To be able to create an Exe file in Visual C++ (I hope by your context you are using 6.0) you need to have fairly good knowledge of C++. .

Nope -- only need a very basic knowledge of c++ to write console programs with the compiler. But it does take some time for newbes to learn how to use the IDE. How to do that depends on which version of VC++ you are using -- version 6.0 is a lot different than 2005.

In general, the steps to getting MSVC++ 2005 to work should be something along the lines of

- Create a new Solution, using a Win32 Console Project

- Right-Click on the project's name in the solution explorer, choose properties.

- In the Configuration Properties Window, look for the option to disable precompiled headers (Under the C/C++ Configuration properties)

- Get rid of stdafx.h and all that rubbish

- use the simplest possible program to test whether you've set it up correctly (you can tell by whether the program compiles) this one will do

int main()
{
}

- Hold [CTRL] and press [F5] to compile & run. (Console Window won't auto-close - this is the 'compile without debugging' mode)
- or, [F7] to build it without running

- if you need the .exe file, look in the project's folder on your computer, in Windows Explorer. The .exe file will be named after the solution.

6.0 is a lot different than 2005.

That is what takes developers a lot of time to port programms from one version to another. So atleast a fair amount of knowledge would be necessary in order to know how and what is working inside a program.

Tell me if i'm wrong.

most people would choose to start from scratch when starting development in VC2005 if their previous version was VC6.

Anything developed that long ago that VC6 was current when development was complete will be in dire need for such a major overhaul that complete replacement is a better option.

Type all of your code into the visual C++ editor and then press ctrl+shift+b. That builds your project and creates an exe file in the Debug or Release folders of the project folder. You can also do it the clicky way from the Build menu in visual C++. You can also use F5 to build and run in debug mode immediately, or ctrl+F5 to build and run in production mode immediately.

The tutorials that you said weren't helpful describe how to build projects here. But that's probably too much information if all you want is to build simple programs.

sorry, I did not mention early which version I am using, I am using the 2005 version.Before I using this compiler, I use another compiler and it give me the exe file different from this one. The exe file created in this compiler automatically exit if I do not have the stop code.This mean when I try to test this compiler,I wrote the simple code and compiled it,then I click on the exe file, it run and exit, it happens so fast so I could not see anything.That's why I asked you how to do it,but actually I already did it.

when I read the comment above. I realize that I did correctly.So I check it that way.Thank you hamrick and all of you were trying to help me.

There's no difference in the output, only in the way the IDE treats it when you run it inside the IDE...

Or if the other IDE and compiler did put in some magic code of their own, they were fundamentally flawed.

There's no difference in the output, only in the way the IDE treats it when you run it inside the IDE...

Or if the other IDE and compiler did put in some magic code of their own, they were fundamentally flawed.

there are different, one needs the system("pause"), one do not need because my previous compiler do not need it

there are different, one needs the system("pause"), one do not need because my previous compiler do not need it

You don't need to do that in VS2005. Read my post earlier in the thread.

Once you create a program you like and you want to extract an .exe just use following steps to save lot of time. Its rather silly but if you are scratching your head where is the .exe console that just appeared in debug then you need to take following two steps.

Very important : 1. In order to get exe for this program go to project properties / c/c++ node / Code Generattion / Set runtime library option to multi-threaded debug /MTd or multi-threade /MT (dll word should be missing)

Very important : 2. Go to linker > Output file (very first option) > give directory name like ExeOutput and name for a .exe

This article has been dead for over six months. Start a new discussion instead.