is there any advantage in using int main() over void main()?.
and when you return a value in int main(), where does the returned value go?
mario123 0
Newbie Poster
Recommended Answers
Jump to PostThe definition
void main() { /* ... */ }
is not and never has been C++, nor has it even been C. See the ISO C++ standard 3.6.1[2] or the ISO C standard 5.1.2.2.1. A conforming implementation acceptsint main() { /* ... */ }
andint main(int argc, char* …
Jump to PostAnother link void main(void) - the Wrong Thing
All 6 Replies
vijayan121 1,152
Posting Virtuoso
Ancient Dragon 5,243
Achieved Level 70 Team Colleague Featured Poster
iamthwee
SpS 34
Posting Pro
vijayan121
commented:
nice link. hadn't seen it earlier. +6
Ancient Dragon 5,243
Achieved Level 70 Team Colleague Featured Poster
Narue 5,707
Bad Cop Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.