Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <stdio.h>
- #include <cstring>
- using namespace std;
- char Buffer[240] = "Hello World!";
- #define Oops "This program was made by %s. Not emokid at all. Hell no. I %s did this!"
- void main()
- {
- char Name [124];
- cout << Buffer;
- cout << endl << "Please insert you name: ";
- cin >> Name;
- char *pch;
- pch = strstr(Buffer,"World");
- strncpy(pch,Name,sizeof(Name)-1);
- cout << endl << Buffer;
- sprintf(Buffer, Oops, Name,Name);
- cout << endl << Buffer << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment