You could just as easily use multiple read() functions; the idea behind using a DataHandler class is for encapsulation. Technically speaking, multiple read() functions would be better if you're avoiding OOP. However, I'd wait to see a reply from ComputerGhost (CG) since it's his code. Perhaps there's more of an advantage to his code than I'm currently aware of. I must admit that his idea is rather well designed... I guess I've been programming in C for so long that I forgot about too many C++ features... :) |