MaximCherchuk

Some shit for you tonight

May 25th, 2017
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.26 KB | None | 0 0
  1. #include <cstdio>
  2. #include <cstring>
  3.  
  4. int main() {
  5.     char string[100] = "Whatever you want";
  6.     char your_str[100] = "you ";
  7.     char *position = strstr(string, your_str);
  8.     int length = strlen(your_str);
  9.     strcpy(position, position + length);
  10.     puts(string);
  11. }
Advertisement
Add Comment
Please, Sign In to add comment