0
How does a main() function in c++differ from main()in c?
c++
2 Answers
0
In C, main() is preceded by a bit of code that sets up the stack for the C programming languageâs calling conventions before jumping to the main subroutine. This represents a handful of instructions.
In C++, main() is preceded a fair amount of runtime setup, calling constructors of any global variables, initializing anything that has to be there when main() starts. How much happens depends on the structure of your program.