Advertisement
Guest User

Untitled

a guest
Dec 13th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.50 KB | None | 0 0
  1. #include <iostream>
  2. #include <clocale>
  3.  
  4. using namespace std;
  5.  
  6.  
  7.     char *strcpy_Magzim(char *str1, const char *str2)
  8.     {
  9.         char *s = str1;
  10.         while ((*s++ = *str2++) != 0);
  11.        
  12.         return (str1);
  13.     }
  14.  
  15.  
  16.  
  17. void main()
  18. {
  19.     setlocale(LC_CTYPE, "rus");
  20.     char str1[128];
  21.     char str2[180];
  22.     cout << "Введите строку: ";
  23.     cin.getline(str1, 127);
  24.     cout << "Введите строку ";
  25.     cin.getline(str2, 127);
  26.     char *pointer = strcpy_Magzim(str1, str2);
  27.     cout << pointer;
  28.     system("pause");
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement