equal
deleted
inserted
replaced
|
1 |
|
2 |
|
3 // STLport regression testsuite component. |
|
4 // To compile as a separate example, please #define MAIN. |
|
5 |
|
6 #include <algorithm> |
|
7 #include <iostream> |
|
8 #include <cstring> |
|
9 |
|
10 |
|
11 #ifdef MAIN |
|
12 #define copy1_test main |
|
13 #endif |
|
14 |
|
15 #if !defined (STLPORT) || defined(__STL_USE_NAMESPACES) |
|
16 using namespace std; |
|
17 #endif |
|
18 int copy1_test(int, char**) |
|
19 { |
|
20 cout<<"Results of copy1_test:"<<endl; |
|
21 char string[23] = "A string to be copied."; |
|
22 |
|
23 char result[23]; |
|
24 copy(string, string + 23, result); |
|
25 cout << " Src: " << string << "\nDest: " << result << endl; |
|
26 |
|
27 if (!strcmp(string, result)) |
|
28 return 0; |
|
29 else |
|
30 return 1; |
|
31 } |