>cin.sync(); // purge any \n
This non-portable. From a standard perspective, it's also nonsensical for sync to discard the contents of the buffer. I've discussed it at length
here.
cin.ignore ( 1024, '\n' );
cin.get(); // wait
Magic numbers should be avoided:
#include <ios>
#include <limits>
cin.ignore ( numeric_limits<streamsize>::max(), '\n' );
cin.get(); // Wait
cin.get(); // trap loose \n
cin.get(); // wait
This only works if the only thing left in the stream is a newline.
cout << "Press any key to continue ...";
string z;
getline(cin,z);
That's seriously overkill, and the prompt is misleading because getline is line oriented. You can hit any key, but unless that key is Enter, nothing will happen.
>I am a little skittish posting in the C++ forum, since I have been kicked out of here unceremoniously in the past.
I don't recall you being "kicked out". Can you link to the offending thread?