Thread: Referring to a C String

  1. #1
    Registered User
    Join Date
    Apr 2003
    Posts
    9

    Referring to a C String

    If I've got the C String:

    char c_string[15];

    Can I refer to it later as:

    c_string

    or does it need to be c_string[]

    or c_string[15]



    Thanks!!

  2. #2
    Burning in Hell! Luigi's Avatar
    Join Date
    Nov 2002
    Posts
    117
    If u type c_string its the whole thing..
    but if u type c_string[15] it will be 16th char hold in that char array.. (since the first one is c_string[0])
    Luigi


    // I use Xcode 1.1 && CodeWarrior 8.3
    // When on Mac Os X 10.3.2

    // I use Microsoft Visual C++ 6.0
    // When on windows XP

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C++ ini file reader problems
    By guitarist809 in forum C++ Programming
    Replies: 7
    Last Post: 09-04-2008, 06:02 AM
  2. We Got _DEBUG Errors
    By Tonto in forum Windows Programming
    Replies: 5
    Last Post: 12-22-2006, 05:45 PM
  3. Something is wrong with this menu...
    By DarkViper in forum Windows Programming
    Replies: 2
    Last Post: 12-14-2002, 11:06 PM
  4. Classes inheretance problem...
    By NANO in forum C++ Programming
    Replies: 12
    Last Post: 12-09-2002, 03:23 PM
  5. Warnings, warnings, warnings?
    By spentdome in forum C Programming
    Replies: 25
    Last Post: 05-27-2002, 06:49 PM