would it be horrible of me to use
for(int i=0;str[i];i++) {
-OR-
for(char* strp=&str;*strp;strp++) {
to do something to every character in a string until the end of the string, or would that possibly overflow into the next data type, so I would have to go with
for(int i=0;i<sizeof(str);i++) { -Or- int i=0; for(char* strp=&str;i<sizeof(str);strp++) { ... i++; } NOTE: please treat the for loops before the 'OR's as one question, and the ones below the 'OR's as a second question. thanks.
for(int i=0;str[i];i++) {
-OR-
for(char* strp=&str;*strp;strp++) {
to do something to every character in a string until the end of the string, or would that possibly overflow into the next data type, so I would have to go with
for(int i=0;i<sizeof(str);i++) { -Or- int i=0; for(char* strp=&str;i<sizeof(str);strp++) { ... i++; } NOTE: please treat the for loops before the 'OR's as one question, and the ones below the 'OR's as a second question. thanks.
