+ 1
Why should we start code with int main() ? What it does ?
4 ответов
+ 4
int main() is the standard. void main was used in older times. It was removed as part of putting some standards
+ 9
As of the latest standard, main() must always return int. Void/bool/char/whatever-dank-not-int-shat is not allowed.
+ 3
It defines the main function for your program, the one that will execute first if your program has multiple functions
+ 2
Compiler will execute anything in this method
I think you can change it to any another type
For example :
void main () or bool main()