help in C++ pleeease
Results 1 to 6 of 6

Thread: help in C++ pleeease

  1. #1
    Member
    Join Date
    Mar 2003
    Posts
    38

    help in C++ pleeease

    can someone tell me how to get the number of characters in a CHAR variable??

  2. #2
    Senior Member
    Join Date
    Mar 2003
    Posts
    170
    >I think this link somewhere in it, it has what your looking for. I am pretty sure.
    > http://tigcc.ticalc.org/doc/cpp.html#SEC10
    >
    >Hope that helped.
    [glowpurple]NooNoo\'s [/glowpurple]

  3. #3
    Senior Member
    Join Date
    Mar 2003
    Posts
    170
    >I think this link somewhere in it, it has what your looking for. I am pretty sure.
    > http://tigcc.ticalc.org/doc/cpp.html#SEC10
    >
    >Hope that helped.
    [glowpurple]NooNoo\'s [/glowpurple]

  4. #4
    Antionline Herpetologist
    Join Date
    Aug 2001
    Posts
    1,165
    Don't you mean a char array? A char variable always contains exactly one character. For a char array, look at the declaration in the source. It should say char something[size]; size is the length of the array. Or do you mean a char pointer? In which case, it's practically impossible. Or do you mean the size of an array at runtime? That's almost impossible too. One of the biggest flaws in C/C++ is that there is no direct way to check the size of a static array at runtime. Any attempt to do that requires tons of code. Let me know what exactly your problem is and I *might* be able to help you
    Cheers,
    cgkanchi
    Buy the Snakes of India book, support research and education (sorry the website has been discontinued)
    My blog: http://biology000.blogspot.com

  5. #5
    Antionline Herpetologist
    Join Date
    Aug 2001
    Posts
    1,165
    Don't you mean a char array? A char variable always contains exactly one character. For a char array, look at the declaration in the source. It should say char something[size]; size is the length of the array. Or do you mean a char pointer? In which case, it's practically impossible. Or do you mean the size of an array at runtime? That's almost impossible too. One of the biggest flaws in C/C++ is that there is no direct way to check the size of a static array at runtime. Any attempt to do that requires tons of code. Let me know what exactly your problem is and I *might* be able to help you
    Cheers,
    cgkanchi
    Buy the Snakes of India book, support research and education (sorry the website has been discontinued)
    My blog: http://biology000.blogspot.com

  6. #6
    Senior Member
    Join Date
    Nov 2002
    Posts
    393
    sizeof() ?
    \"I have a 386 Pentium.\"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •