Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- //This program illustrates the proper way to copy arrays
- string source[] = {"Thursday", "Friday", "Saturday", "Sunday"};
- string destination[4];
- for (int subscript = 0; subscript < (4); subscript++)
- {
- destination[subscript] = source[subscript];
- }
- cout << destination[0] << endl;
- cout << destination[1] << endl;
- cout << destination[2] << endl;
- cout << destination[3] << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement