Im trying to create 2 vectors of 5 objects (Cats) with a constructor parameter (color).
But i cant find the right syntax.
#include <iostream>
#include <bits/stdc++.h>
using namespace std;
class Cats{
Cats(string color);
};
Cats::Cats(string color){
cout << "Cat " << color << " created" << endl;
}
int main()
{
vector<Cats> blacks (5, "black");
vector<Cats> whites (5, "white");
}
I want the string of each cat with the color i write to the constructor.