Subj : Re: Local character strings To : borland.public.cpp.borlandcpp From : Ray Sittig Date : Mon Sep 26 2005 10:31 am Thomas & Bob, Thank you for the feedback. It's now clear that char* my_variable != char my_variable[]. There's an exam question here... Modified program below. >>> snip >>> #include #include int main(void); void PrintText(int version); int main() { PrintText(2); PrintText(1); PrintText(2); printf( "\nPlease press '1' to continue.\n"); while (true) { if (getche() == '1') break; } return 0; } void PrintText(int version) { // array not the same as a pointer // array on stack, initialized with each call // pointer to string literal initialized once globally ? char MyTextArray[] = "2 Array[]"; char* MyTextPointer = "2 Pointer"; if (version == 1) MyTextArray[0] = MyTextPointer[0] = '1'; printf("Version %d\n", version); printf("%s\n%s\n", MyTextArray, MyTextPointer); printf("\n"); } .