tags:

views:

60

answers:

3

I am just getting started with C++ and wanted to know does it really matter what template you chose in Visual Studio 2010 (for creating executables)? Like if I was creating a console application there is CLR Console Application, Win32 Console Application, and Win32 Project (description says it can be an application or a dll), what would I chose (or could i select Empty Project)?

+3  A: 

If you are learning the C++ language itself, you probably want just a console based application. It means basically that you will have a black window that pops up and you can use things like std::cout to output to standard output and std::cin to get input from that console as well.

You probably do not want the CLR console based application because that is for C++ / CLI which is a different language from what C++ is.

Likewise you could use Win32 or MFC as well but that's meant mostly for GUI applications or applications that you don't want a black window popping up.

Brian R. Bondy
+1  A: 

Yes, it matters what you choose.

"Console" applications are for writing applications which print to the screen and take input, but don't produce any graphical widgets.

"CLR Console" is for Managed C++. If you don't know what it is, don't try it yet.

"Win32" is for graphical applications or applications without a console window.

Yann Ramin
+1  A: 

When I'm doing my C++ homework (or working out of a C++ in 24 Hours style of book), I use an empty project and manually add .cpp and .h files to the project.

JMP