can someone tell me how to get the number of characters in a CHAR variable??
Printable View
can someone tell me how to get the number of characters in a CHAR variable??
>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. :)
>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. :)
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
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
sizeof() ?