I have a project that has a GUI (written in QT) and a command-line version. I made use of the rectangle class included in QT: QRect. I would like to break the command-line version’s dependency on QT, so I need a drop-in rectangle class that supports intersection and union. I could write one, but I’d prefer including one if possible.
Any ideas?
If you’re going to find one to include, it’s probably part of another dependency. So your best bet is to try to write your own. Now is a good time to practice making a template class. 🙂
Sorry it’s not the answer you’re expecting.
Just about your design, I hope you’re not taking your GUI version, performing a copy, then modifying it into a console version. Better would be to make a library; then GUI versus console is merely a matter of presentation.