I have this classes below and I want to save a HomePC to a vector, what's the method that I can do that, and how can I print the first or the second element from the vector.
class PC
{
public:
PC(string in_operatingSystem,int in_ramSlots,int in_pcieSlots,int in_totalRamSlots, int in_gbPerRam, int in_cpu, int in_ssd, int in_cost);
virtual void Print() = 0;
virtual void Upgrade() = 0;
protected:
string operatingSystem;
int ramSlots,pcieSlots,totalRamSlots,gbPerRam;
int cpu,ssd;
int cost;
};
class HomePC: public PC
{
public:
HomePC(string in_operatingSystem,int in_ramSlots,int in_pcieSlots,int in_totalRamSlots, int in_gbPerRam, int in_cpu, int in_ssd, int in_cost, string in_model);
void Print();
void Upgrade();
private:
string model;
};