#include <iostream>
#include <cstring>
using namespace std;
 
int main()
{
setlocale(LC_ALL, "rus");
 
char someText1[64] = "Сaйт purecodecpp.com!";
char someText2[] = "Основы С++";
 
cout << "Строка someText1 - \"" << someText1 << "\" \n";
cout << "Строка someText2 - \"" << someText2 << "\" \n\n";
 
strcpy(someText1, someText2); // передаём someText1 и someText2 в функцию
 
cout << "Строка someText1 после копирования someText2 -\n\"" << someText1 << "\" \n\n";
 
return 0;
}


2015-11-08 • Просмотров [ 148 ]