Hello there,
I've written a program which reads a text file and sorts it in the way the user specifies. It was an assignment for one of my college classes. I've got two problems with it. The first one is the way it displays on my terminal. One of the columns sort of overlaps the other one, like in this screenshot: http://img217.imageshack.us/img217/5246/algprog.png (that's openSUSE with g++ 4.4 in bash)
If I compile it under FreeBSD in g++ 4.2.1 it displays properly, but adds two extra lines, like this: http://img217.imageshack.us/img217/304/algprog1.png
The second problem comes sort of from my own newbieness. I'm a beginner at Cpp and I would like to correctly split my program's code into two files (eg. nations.cpp and nations.hpp) ─ could I get some hints on how to do this?
Pull all your declarations out of the .cpp file and put them into the .hpp or .h file. Then, include that file.
You have no global variables, I take it, so that makes your work so much easier.