On 06/07/2014 09:36 PM, Bart Schaefer wrote:
On Jun 7, 9:13pm, Nikolas Garofil wrote: } } > Wouldn't the right thing here be to declare } > } > const char *p1, *p2; } > } > instead of casting? } } The p1 and p2 pointers are increased at the end of the line to walk } through the string so that wouldn't work The "s" pointer is declared const char * and it's incremented as well. I'm not suggesting "char * const p1".
Sorry, misread it.Feel free to make the values constant, it shouldn't give any problems as long as the pointers can change.