0

What is “main” in “ int main”

Is “main’’ compulsory? Can I use any other words instead of it?

30th Dec 2017, 4:58 PM
Alan
Alan - avatar
2 Answers
+ 3
no, you cant, its a standard required function in cpp
30th Dec 2017, 5:23 PM
Botol
Botol - avatar
+ 3
Within standard C++ a main function is required, Outside of standard C++ you can for example write a Windows specific program and use one of Microsoft's custom startup functions (wMain, winMain, wWinmain). In Windows you can also write the program as a DLL and use rundll32 to run it. you can't execute any program without main() but you can hide main() function and execute any program for program go through this link it will help you to understand well https://stackoverflow.com/questions/7050925/is-it-possible-to-write-a-program-without-using-main-function
30th Dec 2017, 5:38 PM
GAWEN STEASY
GAWEN STEASY - avatar