|
-
March 13th, 2003, 08:01 PM
#1
Member
help in C++ pleeease
can someone tell me how to get the number of characters in a CHAR variable??
-
March 16th, 2003, 12:09 PM
#2
>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.
-
March 16th, 2003, 12:09 PM
#3
>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.
-
March 16th, 2003, 01:23 PM
#4
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
-
March 16th, 2003, 01:23 PM
#5
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
-
March 17th, 2003, 10:26 AM
#6
Senior Member
\"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
-
Forum Rules
|
|