123456789101112
#include <vector> //... std::vector<int> primes; //... //... else { cout << number << " is prime"; primes.push_back(number); } //...