do you require GUI or just I/O kind of program?
since C++ is Object Oriented, I suggest to code your program using a "class"
Please shed some light on your Question, only that we can help you. Also fully analyze your program and then post the Question. I would then be able to help you with it.