I can make an array and initialise it as follows:
int a[] = {10, 20, 30};
How can I make a std::vector and initialise it in the same way?
The best method I know is:
std::vector<int> ints;
ints.push_back(10);
ints.push_back(20);
ints.push_back(30);
Is there an alternative?