unique1.cpp

unique1.cpp

#include ‹stl.h›

#include ‹iostream.h›

int numbers[8] = {0, 1, 1, 2, 2, 2, 3, 4};

int main() {

 unique(numbers, numbers + 8);

 for (int i = 0; i ‹ 8; i ++) cout ‹‹ numbers[i] ‹‹ ;

 cout ‹‹ endl;

 return 0;

}