main() function requirements - jimmytwei/oneAPI-samples GitHub Wiki
main() function requirements
- The main() function must return intβ
- The return values areβ 0 and -1
- 0: SUCCESS
- -1: FAILURE (any non-zero can be used)β
- C++ Core Guideline
- Main function specifications
- The return values areβ 0 and -1
- The two forms allowed are:β
- int main() { body }β
- int main( int argc, char *argv[] ) { body }β