#include <algorithm>
#include <iostream>
#include <iterator>
#include <vector>
using namespace std;
template<typename T>
bool contains(const vector<T>& vec, const T& val) {
return find(begin(vec), end(vec), val) != end(vec);
}
template<typename T>
void show(const char* prompt, const vector<T>& vec) {
cout << prompt;
copy(begin(vec), end(vec), ostream_iterator<T>(cout, " "));
cout.put('\n');
}
template<typename T>
T parse(const char* prompt) {
cout << prompt;
T value;
cin >> value;
cin.ignore(0x1000, '\n');
return value;
}
int main() {
using value_t = int;
vector<value_t> values{ 25,10, 73, 19, 38, 55, 48 };
show("values: ", values);
while (true) {
const auto value = parse<value_t>("value: ");
if (!contains(values, value)) values.push_back(value);
show("values: ", values);
}
}