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); 라고 계속 뜨는데 무슨소리인지 모르겠습니다

1 답변

답변을 하려면 로그인이 필요합니다.

프로그래머스 커뮤니티는 개발자들을 위한 Q&A 서비스입니다. 로그인해야 답변을 작성하실 수 있습니다.

(ಠ_ಠ)
(ಠ‿ಠ)