C++ Program to retrieve Capital City for states in the United States.

The aim of this program is to create a little quiz for kids or even adults. To quickly learn the capital city for each state in the United States. Comments are added for explanation. #include <iostream> #include <string> #include <set> #include <map> using namespace std; //State city class definition class stateCity { public: stateCity (const […]

Read More

C++ Knight Of Tours Program

This program is a little complicated and needs deeper understanding. l try to put comments to explain what is going on, if you find something confusing, please leave a comment. #include <iostream> #include <vector> #include <string> #include <iomanip> using namespace std; template <typename T> class matrix { public: matrix(int numRows = 1, int numCols = […]

Read More

C++ PROGRAM USING INHERITANCE AND POLYMORPHISM

In this post l just want to write a simple program to display usage of inheritance and polymorphism in C++. I’ve included comments in the code to help understand what is going on and l hope this is useful to someone. #include <iostream> using namespace std; #include <iomanip> #include <string> #include <list> #include <vector> #include […]

Read More