Thread: strcmp return value

  1. #16
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    Quote Originally Posted by CommonTater View Post
    I said....


    Tabstop says...

    and later...


    Ain't it a pain when you get so zealous about correcting people that it comes right back around to bite you....
    Brilliant use of selective editing there.

  2. #17
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by Salem View Post
    Portable code use <0, ==0 and >0
    Absolutely... even if the standard said explicitly to expect -1, 0 or 1 I'd still use <0, ==0 or > 0 as my test when sorting... Simply because there are compilers out there that do not follow the standards or pre-date them.

    (Not that portable code is an issue with me personally... Believe me, nobody will ever see the source code for any of my larger projects without handing over a LOT of money.)

  3. #18
    Registered User cph's Avatar
    Join Date
    Sep 2008
    Location
    Indonesia
    Posts
    86
    thank you very much for the explanations everyone

  4. #19
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by tabstop View Post
    Brilliant use of selective editing there.
    Thank you. Coming from you, I'll take that as a compliment.

  5. #20
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by cph View Post
    thank you very much for the explanations everyone
    Begging the question... Did we help you or did we make it worse?

  6. #21
    Registered User cph's Avatar
    Join Date
    Sep 2008
    Location
    Indonesia
    Posts
    86
    Quote Originally Posted by CommonTater View Post
    Begging the question... Did we help you or did we make it worse?
    yeah, the explanations are very helpful.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. An efficient approach to TicTacToe AI?
    By xofvc4rqb in forum C++ Programming
    Replies: 11
    Last Post: 01-15-2011, 05:09 PM
  2. New string functions
    By Elysia in forum C Programming
    Replies: 11
    Last Post: 03-28-2009, 05:03 AM
  3. Another syntax error
    By caldeira in forum C Programming
    Replies: 31
    Last Post: 09-05-2008, 01:01 AM
  4. opengl help
    By heat511 in forum Game Programming
    Replies: 4
    Last Post: 04-05-2004, 01:08 AM
  5. oh me oh my hash maps up the wazoo
    By DarkDays in forum C++ Programming
    Replies: 5
    Last Post: 11-30-2001, 12:54 PM