non-class type이라는데
조회수 1909회
include
include
include
using namespace std;
int main() { char str[80]; char find[10]; char change[10]; char* pstr; char* temp = new char[80]; cin.getline(str, 80); cin.getline(find,10); cin.getline(change,10);
pstr =strstr(str,find);
int index=str.find(find);
int len=strlen(str);
str.replace(index,len,change);
delete []temp;
cout<< str<< endl;
return 0;
} request for member ‘find’ in ‘str’, which is of non-class type ‘char [80]’ int index=str.find(find); 라고 계속 뜨는데 무슨소리인지 모르겠습니다
댓글 입력