C++ No main() function?

Viewed 9782

I'm a graduate programmer and when it comes to C++ I expect there to be a main() function everytime.

However I've been given a project written in C++ with Visual Studio 6.0 and it doesn't have a main() function. I really can't figure out how this program executes or where it begins.

I have seen examples of the Macro that can be used to change the name of the main() function, however this code shows no sign of that practice.

Can anyone suggest what I should be looking for?

5 Answers

Just for information, since this is not a general case, in C (and I suppose in C++) there could be programs without a main function. (I worked with one some years ago). Granted it was a embedded programming environment, not windows.

The trick was that the start up code in assembler called a completely different function after finished executing.

So even our teachers taught us about there is always main in C/C++ that is not an absolute truth

Related