search
Login

Categories


C Books Guide and List
C++ Books Guide and List
Best Java Books

3.8k questions

4k answers

117 comments

10.7k users

0 votes
67 views
asked anonymous

1 Answer

0 votes
 
Best answer
int main()

main() must return int. Not void, not bool, not float. int. Just int, nothing but int, only int.

Some compilers accept void main(), but that is non-standard and shouldn't be used. Instead use int main().
answered Sr Member 3.6k points 1 2 8

Related questions

0 votes
1 answer 367 views
367 views
Difference between using ‘void main()’ and ‘int main()’
asked arnav Sr Member 1.3k points 9 21 28
0 votes
1 answer 86 views
86 views
When should I use references, and when should I use pointers?
asked albertina Geek 15.7k points 5 9 21
0 votes
2 answers 4.1K views
0 votes
1 answer 429 views
429 views
which loop is better in C and C++, for loop or while loop or do while?
asked anonymous
1 vote
1 answer 50 views
...