I have something like this where Client and Order are classes :
  std::vector<std::pair<Client,Order>> pair;
    pair.push_back(std::make_pair(Client(2,"Anca"),Order(3,1)));
    pair.push_back(std::make_pair(Client(16,"Maria"),Order(1,3)));
    pair.push_back(std::make_pair(Client(29,"Alex"),Order(10,5)));
class Client{
private:
    int dateWhenOrderWasPlaced;
    std::string clientName;
public:
    Client(int date,std::string name){
        dateWhenOrderWasPlaced=date;
        clientName=name;
    }
class Order{
private:
    int amountPizza;
    int pizzaAge;
public:
    Order(int amPizza,int agePizza){
        amountPizza=amPizza;
        pizzaAge=agePizza;
    }
And i can't figure out how to print this.I have tried in many ways :
void print(std::vector<std::pair<Client,Order>> pair){
    for(const auto& it : pair){
        std::cout << "First: "<<pair[it].first<< ", Second: " << pair[it].second <<std::endl;
    }
}
And this :
void print(std::vector<std::pair<Client,Order>> pair){
    for(const auto& it : pair){
        std::cout << "First: "<<it.first<< ", Second: " << it.second <<std::endl;
    }
}
And in the both ways i have error(first-no operator[] and second,no operator <<)
 
    