#include <iostream>
#include <vector>
void print(std::vector<double> vec) {
for (std::size_t i(0), len(vec.size()); i != len; i++) {
std::cout << vec[i] << " ";
}
std::cout << "\n";
}
int main() {
std::vector<double> vec;
// push_back add values to the end of the vector,
// and it will automatically resize the vector
vec.push_back(12);
vec.push_back(3);
vec.push_back(19);
vec.push_back(0);
print(vec);
vec.push_back(600);
vec.push_back(3.14);
vec.push_back(4000);
print(vec);
}
/*
run:
12 3 19 0
12 3 19 0 600 3.14 4000
*/