• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: main() vs getopt() signature mismatch
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: main() vs getopt() signature mismatch


  • Subject: Re: main() vs getopt() signature mismatch
  • From: Todd Heberlein <email@hidden>
  • Date: Fri, 25 Oct 2013 09:54:54 -0700


On Oct 24, 2013, at 11:51 PM, Jean-Daniel Dupas <email@hidden> wrote:

What about changing main to "int main(int argc, char *argv[])" as defined in the C standard (section 5.1.2.2.1) ? 

Interesting. When creating a new command line tool in Xcode, main.cpp begins

int main(int argc, const char * argv[])

I looked around to see if C++11 changed this, but I haven’t found anything yet. I wonder why Apple adds the “const” if it isn’t part of the standard?

Todd

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: main() vs getopt() signature mismatch
      • From: Jean-Daniel Dupas <email@hidden>
References: 
 >main() vs getopt() signature mismatch (From: Todd Heberlein <email@hidden>)
 >Re: main() vs getopt() signature mismatch (From: Jean-Daniel Dupas <email@hidden>)

  • Prev by Date: Re: Xcode 5 & making an .ipa file for ad hoc distribution
  • Next by Date: Re: Where are my man pages?
  • Previous by thread: Re: main() vs getopt() signature mismatch
  • Next by thread: Re: main() vs getopt() signature mismatch
  • Index(es):
    • Date
    • Thread