|
포인터.구조체 님이 쓰신 글 :
: 궁금 님이 쓰신 글 :
: : [C++ Error] Unit1.cpp(339): E2034 Cannot convert '_Point * *' to 'const tagPOINT *'
: : 에러가 이렇게 발생하는데염..
: :
: : 제 소스...
: : typedef struct _Point
: : {
: : double dx;
: : double dy;
: : }SHPPoint;
: :
: : typedef struct _PolyLine
: : {
: : double xmin;
: : double ymin;
: : double xmax;
: : double ymax;
: : int NumParts;
: : int NumPoints;
: : int *Parts;
: : SHPPoint *Points;
: : }SHPPolyLine;
: :
: : SHPPolyLine *m_pon;
: : m_pon = new SHPPolyLine[m_nRecordCnt];
: :
: : Polyline(m_hMemDC, m_pon->Points, nNumPoints);
: : 에서염 m_pon->Points이 틀린것 같은데염..
: :
: : POINT p[8];
: : Polyline(hDC, p, 4);
: : 이렇게는 되는데.....
: :
: :
: :
:
: _PolyLine 구조체의 Points 멤버를
: a. POINT 배열로 만들든지
: b. POINT *Points;로 한 다음 메모리를 할당해야 합니다.
: 물론, Polyline을 호출하여 원하는 다각형을 그리려면 Points의 각 원소에는 좌표가 설정되어 있어야 합니다.
:
POINT *Points;로 한 다음 메모리를 할당 한 후에 m_pon->Points를 어떻게 해야 할지를...
제 생각에는
POINT *p;
p = new POINT[a];
p->x = m_pon[a].Points[b].dx; 이런식으로 하는게 맞나요??
|