merge0.cpp

We use cookies. Read the Privacy and Cookie Policy

merge0.cpp

#include ‹stl.h›

#include ‹iostream.h›

int numbers1[5] = {1, 6, 13, 25, 101};

int numbers2[5] = {-5, 26, 36, 46, 99};

int main() {

 int result[10];

 merge(numbers1, numbers1 + 5, numbers2, numbers2 + 5, result);

 for (int i = 0; i ‹ 10; i++) cout ‹‹ result[i] ‹‹ ;

 cout ‹‹ endl;

 return 0;

}