Advertisement
Guest User

Untitled

a guest
Jan 18th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.34 KB | None | 0 0
  1. namespace my_cstring {
  2.     char * strcat(char * destination, const char * source) {
  3.         auto answer = destination;
  4.         while (*destination != 0) {
  5.             ++destination;
  6.         }
  7.         while (*source != 0) {
  8.             *destination = *source;
  9.             ++destination; ++source;
  10.         }
  11.         return answer;
  12.     }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement