NO

Author Topic: warning #2117: Old-style function definition for 'main'.  (Read 506 times)

Offline Hemanth

  • Member
  • *
  • Posts: 4
warning #2117: Old-style function definition for 'main'.
« on: January 22, 2017, 07:27:40 PM »
int main(){
}
Produces this warning
warning #2117: Old-style function definition for 'main'.


Simple Solution
-----------------
int main(void){
}

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 1587
Re: warning #2117: Old-style function definition for 'main'.
« Reply #1 on: January 22, 2017, 09:26:10 PM »
This is not a bug.
C99-C11 requires parameters qualification. If you want to use the alternative form of main without parameters, allowed by standard, you must specify 'void' for no parameters.