While it may seem a foolish question, I'm trying to get caught up with some of the things added and done with the C++ language since I've been away.
I ask this question, as I'm curious. Something that bit me about 20 years ago using Borland's C++ compiler (don't recall version). I was following some book along that had some interesting code in it, and as most programmers "learn by doing", I simply compiled the source, and tested the code "as it was".
Then, attempting to make changes to the code, I searched for the main() function so I could trace the code, make some slight changes and re-run to make sure I had down what the author was doing. However, there was no main() function anywhere. It wasn't overridden, or played with using a #define, etc.
The program actually started by declaring a global variable from a class, and the constructor for the class is what actually "started" the code. I HAVEN'T mis-remembered this - it took me 3-4 days to track down and run in debug, etc. to determine just what was going on. I thought it was the stupidist thing I've ever run into - but that was the way the code was written.
So - I'm just trying to find out if main() is still not required (or is this a vendor implementation thing), or the standard has changed, etc. and main IS now required. Did some searching and couldn't find a definitive answer.
And no - no main was suppled at the time by the compiler (at least none that I could determine through the use of debug, etc.). The code itself was not windows specific, and I believe I used DOS or Console project for the entire project (Console might have provided something - but DOS wouldn't have).
It was some database-type code, and the book and code were NOT compiler specific either (at least none were mentioned on the book). I didn't try it with other compilers at the time, just Borland. So I don't think it was some compiler specific quirk - as the code was supposed to work in "any" compiler at the time. As I said, this was about '93-94 timeframe.
Technically, C++ supports freestanding compilation model (OS kernels, bootloaders, etc), which don't require the main() function. Standardese: "It is implementation-defined whether a program in a freestanding environment is required to define a main function." §3.6.1[basic.start.main]/1
As for Windows, _tmain() is just a macro which can be ignored (unless you care about processing UTF-16 commandline arguments) - main() works too.