65,187
社区成员




Point.h
#ifndef _POINT_H
class Point
{
public:
Point(int x = 0, int y = 0 );
void Description();
private:
int m_x;
int m_y;
};
#endif
Size.h
#ifndef _SIZE_H
class Point;
class Size
{
public:
Size( Point& point, int height = 0, int width = 0 );
void Description();
private:
int m_Height;
int m_Width;
Point m_point;
};
#endif
main.cpp
#include "stdafx.h"
#include "Point.h"
#include "Size.h"
Point myPoint(4,7);
Size mySize( myPoint, 5,5);
int main(int argc, char* argv[])
{
printf("Hello World!\n");
mySize.Description();
return 0;
}