Here's an example that uses the c-style string utility functions that come with #include char me[] = "Faan Tone"; char him[] = "Teddy"; char another[20]; cout << me; // outputs "Faan Tone" strcpy(another, me); // copies "Faan Tone" into the variable another cout << strlen(me); // outputs 9 if (strcmp(him, me) < 0) cout << him << " " << me; // outputs the two names in alphabetical order else cout << me << " " << him; // Now try to swap him and me: strcpy(another, me); // copy "Faan Tone" into the variable another strcpy(me, him); // copy "Teddy" into the variable me strcpy(him, another); // Big bug here! There's not enough space in the // variable him to hold the contents of another. // To fix this problem, we need to learn all about // dynamically allocated memory. OR, we could use // the string class, which handles this problem for us Same code, done with strings: string me("Faan Tone"); string him("Teddy"); string another; cout << me; another = me; // entire string in me is copied to variable another cout << me.length(); if (him < me) cout << him << " " << me; else cout << me << " " << him; // Now here's the swap another = me; me = him; him = another; // no bugs here! this works perfectly, thanks to the string // class which handles all memory issues for us.