C++ 클래스질문
글쓴이: qw3709 / 작성시간: 목, 2018/01/25 - 4:54오후
#include<iostream> #include<cstdio> #include<string.h> using namespace std; class Person{ string name; string tel; public: string getName() {return name; } string getTel() { return tel; } void set(string name, string tel){}; void searchname(string named) { if (named ==getName()) cout<<tel<<endl; }; }; void Person::set(string Name, string Tel) { name=Name; tel=Tel; }
void Person::set(string Name, string Tel)
여기서 에러가뜨네요
error:
[Error] prototype for 'void Person::set(std::string, std::string)' does not match any in class 'Person'
Forums:
아 수정했습니다... 간단한 오류였네요
아 수정했습니다... 간단한 오류였네요
댓글 달기