Hello,
when i used 'void' as return type of main() in AVR studio, its giving warning. Actually, why do we need to give 'int' as return type for main ? :?
Int as return type for main() why?
Author
Message
Level: Moderator
Joined: Mon. Jul 18, 2005
Posts: 101080 View posts
Location: (using avr-gcc in) Finchingfield, Essex, England
This is asked about once every 1-2 months. Find one of the many threads where it's explained already.
EDIT: 10 seconds with the search engine (int main return void) hits this thread:
https://www.avrfreaks.net/index.p...
Try to get into the habit of searching to see if the topic has already been discussed before posting (99 times out of 100 it will have been discussed already - often MANY times).
Last Edited: Wed. Sep 15, 2010 - 11:26 AM
You are very lucky. You have just stumbled upon a subject that someone has discussed before: https://www.avrfreaks.net/index.p...
Thank you all !