And no need to do -1, because the index of the zero is the same as the length of the string.
--
Mats
Printable View
And no need to do -1, because the index of the zero is the same as the length of the string.
--
Mats
You don't really need the variable ptrToStr. You can just use this directly:
Also consider using const char *'s.Code:return &source[i];