>> what's so wrong about using cstrings in me' code..?!?!?
Nothing. It's your choice. IMO many C++ programmers (especially beginners) would benefit from learning and using C++ tools, and many just use C versions because their class/instructor/book uses them and they don't know any better. I can see wanting to stay consistent when going through Petzold, but the algorithm above would be simpler, easier and safer (IMO) with C++ tools.