In Visual C++ 2008 Express, when I create a new console project I get the following program to start with:
//Explodey.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
int _tmain(int argc,_TCHAR* argv[])
{
return 0;
}
I have a few questions about it:
Why is the main function _tmain instead of main?
I'd thought the argv
parameter was supposed to be char* argv[]
instead of _TCHAR
.
What's stdafx.h
?
This doesn't really feel like the same C++ I'm used to.
Take a look here for _tmain... etc.
What is the difference between _tmain() and main() in C++?
stdafx.h is a precompiled header (optional) for Windows applications. More here:
http://en.wikipedia.org/wiki/Precompiled_header
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With