28 Nov
2003
28 Nov
'03
13:39
Hi all, I'm currently rewriting many of the standard functions in C++. No i'm not wierd, i'm in the process of learning and figured this would be a good exercise. Anyway, my strlen() function is bringing up a warning. Although I understand what the warning mean, I don't understand why it is a warning. Can someone please quickly point out the technicalities. The main point I sometimes trip up with is pointers and references (as I suspect most people learning C++ encounter) int *MyStrlen(const char *source) { int i = 0; while (*source) { *source++; i++; } return &i; } Thanks ----------------------------------------- Email provided by http://www.ntlhome.com/