So, basically, this is what the classes would look like:
class Item {
std::string name;
}
class PostOffice {
std::vector<Ite m> mail;
}
class House {
std::vector<Ite m> mail;
}
I'd like to be able to do this in my main:
PostOffice dhl;
dhl.sendToHouse ();
And after the sendToHouse() function is called, the items from the PostOffice object's vector would be transfered to the House object's vector. Is that possible without pointers?
class Item {
std::string name;
}
class PostOffice {
std::vector<Ite m> mail;
}
class House {
std::vector<Ite m> mail;
}
I'd like to be able to do this in my main:
PostOffice dhl;
dhl.sendToHouse ();
And after the sendToHouse() function is called, the items from the PostOffice object's vector would be transfered to the House object's vector. Is that possible without pointers?
Comment