chapter09

# Net cstud void prn static void prncnt int cstudcnt0

This preview shows page 1. Sign up to view the full content.

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: t; x => " ; 39 x.ShowComplex(); 40 cout<<" y => " ; 41 y.ShowComplex(); 42 43 cout<<"-------------------------------- \n" ; 44 CopyComplex(&y, x); 45 cout<<" x => " ; 46 x.ShowComplex(); 47 cout<<" y => " ; 48 y.ShowComplex(); 49 } - 22 - IT COOKBOOK 2) 매개변수가 객체인 함수 IT COOKBOOK 객체에 객체에 대한 레퍼런스에 의한 전달 방식 - 23 - 2) 매개변수가 객체인 함수 IT COOKBOOK - 24 - 2) 매개변수가 객체인 함수 IT COOKBOOK - 25 - [실습하기 9-7] 객체의 레퍼런스에 의한 전달 방식의 함수 작성하기 COOKBOOK IT [예제 9-7] 9_7.cpp //-----------------------중복된 내용 생략----------------------29 Complex & CopyComplex(Complex &des, const Complex &src) 30 { 31 des=src; 32 return des; 33 } 34 void main() 35 { 36 Complex x(10, 20); 37 Complex y(30, 40); 38 Complex z; 39 40 z=CopyComplex(y, x); 41 cout<<" x => " ; 42 x.ShowComplex(); 43 cout<<" y => " ; 44 y.ShowComplex(); 45 cout<<" z => " ; 46 z.ShowComplex(); 47 - 26 - 3) 정적 멤버변수와 정적 멤버함수 IT COOKBOOK 정적 정적 멤버변수의 특징 ① 정적 멤버변수는 클래스의 모든 인스턴스(객체)에 의해 공유된다. ② 정적 멤버변수에 자료가 저장되어...
View Full Document

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern