Thread: strcat(), searching for a name

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,612
    I'm pretty sure you made the mistake. The character '0', the one you see when you print 0, is nothing like the others. So complaining about NULL was pointless of you, even if you were right that '0' is not '\0'. You just didn't say it.

  2. #2
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by whiteflags View Post
    I'm pretty sure you made the mistake. The character '0', the one you see when you print 0, is nothing like the others.
    I am well aware of that fact.
    I was pointing out that '\0' and 0 should not be called NULL.
    (I don't know if '\0' is guaranteed to be 0, either.)
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  3. #3
    Registered User
    Join Date
    Aug 2010
    Location
    Poland
    Posts
    733
    Quote Originally Posted by Elysia View Post
    I don't know if '\0' is guaranteed to be 0, either.
    It is not a special escape sequence like \t. It is just an integer constant 0. However, I am not sure if it is internally interpreted as octal or decimal, but the result is the same anyway. AFAIK '\0' is char L'\0' is wchar_t and 0 is int.

    EDIT: I was thinking that you can use decimals also like \255 but I just realized you cannot. So it is octal's 0...
    Last edited by kmdv; 06-17-2011 at 06:17 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. strcat
    By TGM76 in forum C Programming
    Replies: 3
    Last Post: 07-27-2010, 07:42 AM
  2. How to use strcat
    By theprophet in forum C++ Programming
    Replies: 2
    Last Post: 04-30-2005, 10:05 AM
  3. strcat
    By warney_out in forum C Programming
    Replies: 7
    Last Post: 10-01-2004, 01:01 AM
  4. strcat
    By linuxdude in forum C Programming
    Replies: 1
    Last Post: 12-11-2003, 04:55 PM
  5. Help with strcat
    By mmondok in forum C Programming
    Replies: 1
    Last Post: 02-02-2003, 06:33 PM