Original Post
Hello! I'm attempting to increment a char pointer through a string, evaluating the character the char pointer is currently pointing to. When run, it appears the string pointer never reaches the '\0' character I expect to be at the end of the string. Since this is the test for when the "for" loop incrementing through the characters of the string should exit, I run into problems, and the char pointer starts pointing to all sorts of weird things. Here's a short test program that shows the problem: #include #include using namespace std; void produceString(char *iString) { for (char *tString = iString; tString != '\0'; tString++) { cout << tString << endl; } } int main(int argc, char** argv) { produceString("F"); return 0; } Any help would be greatly appreciated!