How to make your code GUI-PROOF

Hey, I'm getting to the point where I'm confident in my code... or will be very confident in my code.

I haven't learned any GUIs yet, but I do plan so in the future. How can I make my code GUI-PROOF... as in code that can easily be used with a GUI for future with little to no modification.

I was thinking that if I made it for console, then the best way would simply be to template/class any and everything I would use over... and what I would use with my objects/templates for the cout/cin or iostream library... I would replace with the GUI...

Is that understandable, and, if that is understandable, would that be feasible?
If you put all of the basic parts into separate functions, then using the same code on a GUI is easy. If you put all of the dialog into it's own separate files, all the better, because now even translation will be easier. If you have a console program, all of the console stuff will probably be tossed or not called when creating the GUI unless you have the dialog separate so you can manipulate it, so all console commands should be in their own functions and classes.

You probably won't use the std::cout or std::cin, as you will be writing a graphical font to the screen.
Topic archived. No new replies allowed.