Advertisement
SergeyPGUTI

8.1.2

Feb 13th, 2016
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.34 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3. #include <string.h>
  4.  
  5.  
  6. using namespace std;
  7.  
  8. void myStrcpy(char* a,const char b[])
  9. {
  10.     int length=strlen(b);
  11.     for (int i=0;i<length;i++)
  12.     {
  13.         a[i]=b[i];
  14.     }
  15.     a[length]=0;
  16. }
  17.  
  18. int main()
  19. {
  20.     char str[50];
  21.     myStrcpy(str,"232323232332");
  22.     cout<<str;
  23.     return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement