c++ - Main in MFC console app (NOT WinMain, main) -
for sample program, though doing me. wondering how happening.
i created console application "mfc" checkbox enabled while creating project (vc2008). created standard _tmain
implementaion afxwininit
calls , all. wrote custom function main
, called _tmain
itself.
now press f10 or f11 start debugging, goes main
, not _tmain
(yes, via _tmain
itself) - how , why - that's question.
no didn't set project setting @ all. 32-bit debug build.
edit: interesting thing this:
#include "stdafx.h" void main() { printf("this custom main"); } int _tmain(int argc, _tchar* argv[]) { if(false) // getting fooled, or fooling us? main(); return 0; }
visual studio considers main
entry point, , doesn't when start debugging f10/f11 - since false
false , doesn't allow main
called!
my test shows goes _tmain
first, before custom main
.
Comments
Post a Comment