C++Builder Programming Forum
C++Builder  |  Delphi  |  FireMonkey  |  C/C++  |  Free Pascal  |  Firebird
볼랜드포럼 BorlandForum
 경고! 게시물 작성자의 사전 허락없는 메일주소 추출행위 절대 금지
C++빌더 포럼
Q & A
FAQ
팁&트릭
강좌/문서
자료실
컴포넌트/라이브러리
메신저 프로젝트
볼랜드포럼 홈
헤드라인 뉴스
IT 뉴스
공지사항
자유게시판
해피 브레이크
공동 프로젝트
구인/구직
회원 장터
건의사항
운영진 게시판
회원 메뉴
북마크
볼랜드포럼 광고 모집

C++빌더 Q&A
C++Builder Programming Q&A
[71288] Re:C++ 을 처음배우는 학생입니다.
스탈리스 [sim51177] 3162 읽음    2014-05-11 21:34
disp 함수가 Student 클래스에 없습니다.

김영섭 님이 쓰신 글 :
:



:
:
: #include<iostream.h>
: #include<string.h>
:
:
: class Student{
:
:
: private:
:     char name[20];
:     int age;
:     float height;
: public:
:     void setInfo(char *_name, int _age, float _height){
:         strcpy(name, _name);
:         age= _age;
:         height = _height;
:     }
:
:     char getName();
:     int getAge();
:     float getHeight();
:
: };
:
: char Student::getName(){
:     return *name;
: }
:
: int Student::getAge(){
:     return age;
: }
:
:
: float Student::getHeight(){
:     return height;
: }
: void main(){
:     Student s;
:
:     s.setInfo("홍길동", 17, 178.3f);
:
:     cout << "이름 : " << s.getName() << endl;
:     cout << "나이 : " << s.getAge() << endl;
:     cout << " 키  : " << s.getHeight() << endl;
:
:
:     s.disp();
: }
:
: -----------------------------------------------------------
: 오류내용:
:
: --------------------Configuration: gpgp_001 - Win32 Debug--------------------
: Compiling...
: asdf.cpp
: C:\Program Files (x86)\Microsoft Visual Studio\MyProjects\gpgp_001\asdf.cpp(58) : error C2039: 'disp' : is not a member of 'Student'
:         C:\Program Files (x86)\Microsoft Visual Studio\MyProjects\gpgp_001\asdf.cpp(9) : see declaration of 'Student'
: Error executing cl.exe.
:
: asdf.obj - 1 error(s), 0 warning(s)
: -------------------------------------------------------------------------------------------------------
:
: 여기서 오류가 하나뜨는데 왜뜨는지모르겟네요..
:
: 도움 부탁드립니다 ㅠㅠ

+ -

관련 글 리스트
71287 C++ 을 처음배우는 학생입니다. 김영섭 3085 2014/05/11
71288     Re:C++ 을 처음배우는 학생입니다. 스탈리스 3162 2014/05/11
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.