Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define _CRT_SECURE_NO_WARNINGS
- #include <iostream>
- #include <string>
- #define 情弱 "ゆうたりゃん"
- using namespace std;
- void main(){
- string m;
- size_t p;
- char t[256];
- bool f = false;
- cout << "検索対象を入力(,区切り)\t> ";
- cin >> m;
- while((p=m.find(","))!=string::npos){
- strcpy(t, m.c_str());
- t[p] = '\0';
- if(!strcmp(t, 情弱)){
- cout << "発見 : "<< t << "は情弱です\n";
- f = true;
- }
- m = t + p + 1;
- }
- if(!f)
- printf("該当なし");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement