Print all nonzero elements of a vector on the standard output.Example
vector
V.push_back(-2);
V.push_back(0);
V.push_back(-1);
V.push_back(0);
V.push_back(1);
V.push_back(2);
remove_copy(V.begin(), V.end(), ostream_iterator
Print all nonzero elements of a vector on the standard output.Example
vector
V.push_back(-2);
V.push_back(0);
V.push_back(-1);
V.push_back(0);
V.push_back(1);
V.push_back(2);
remove_copy(V.begin(), V.end(), ostream_iterator