VC++ API프로그램_2
지난 포스트에 이어서, 오늘은
* 디버깅- 예, OutputDebugString()함수를 사용한
* 클래스 캡슐화 - 멤버정의 .h해더파일 + .cpp맴버구현파일 구조
개념설명_아래이미지(자바클래스에서 정의Class와 Implements-구현Class와 비슷한 개념)
-예,
- student.h 헤더파일 student.h
class CPerson
{...};
class CProfessor : public CPerson
{...};
class CStudent : public CPerson
{...};
-------------------------------------
- student.cpp 구현파일 student.cpp
#include "student.h"
------------------------------------------
------------------------------------------
- HelloAPI.cpp 메인실행파일 HelloAPI.cpp
...
#include <atlstr.h> //문자열 합치기위한 CString 사용을 위해
#include "student.h"//사용자제작 헤더파일
...
---------------------------------------------------------------
* 클래스(멤버변수,멤버함수의 get,set)- 예, void SetNumber(int num);
* 클래스 상속(inheritance)- 예, class CStudent : public CPerson
* 클래스의 함수상속- 예, CProfessor::CProfessor(LPCTSTR pName, int age, LPCTSTR pMajor) : CPerson(pName, age)
* 비주얼C++프로젝트 구조(아래)
다음 포스트에서는 MFC제작중에 SDI 프로그램으로 진행됩니다.