int :: cadena calculatelenght(const cadena& a, const char* cad) { cadena c; int lenght = 0; char* punt; punt = cad; while(*punt){ lenght++; punt++; } return lenght; }
I have this problem, I want to calculate the length of the C string without using functions like strlen , in other methods of my cadena class I can, because it is not const char *, but now I do not know what to do.
freinn
source share