copy1.cpp

We use cookies. Read the Privacy and Cookie Policy

copy1.cpp

#include ‹stl.h›

#include ‹iostream.h›

#include ‹string.h›

char string[23] = "A string to be copied.";

int main() {

 char result[23];

 copy(string, string + 23, result);

 cout ‹‹ " Src: " ‹‹ string ‹‹ " Dest: " ‹‹ result ‹‹ endl;

 return 0;

}