prog.cpp:1:59: error: ‘CDC’ has not been declared
void draw_hex(double x_center, double y_center, double R, CDC* pDC) {
^
prog.cpp: In function ‘void draw_hex(double, double, double, int*)’:
prog.cpp:4:27: error: ‘cos’ was not declared in this scope
double C = R * cos(PI / 6);
^
prog.cpp:5:27: error: ‘sin’ was not declared in this scope
double S = R * sin(PI / 6);
^
prog.cpp:7:7: error: request for member ‘MoveTo’ in ‘* pDC’, which is of non-class type ‘int’
pDC->MoveTo(x_center, y_center - R);
^
prog.cpp:8:7: error: request for member ‘LineTo’ in ‘* pDC’, which is of non-class type ‘int’
pDC->LineTo(x_center + C, y_center - S);
^
prog.cpp:9:7: error: request for member ‘LineTo’ in ‘* pDC’, which is of non-class type ‘int’
pDC->LineTo(x_center + C, y_center + S);
^
prog.cpp:10:7: error: request for member ‘LineTo’ in ‘* pDC’, which is of non-class type ‘int’
pDC->LineTo(x_center, y_center + R);
^
prog.cpp:11:7: error: request for member ‘LineTo’ in ‘* pDC’, which is of non-class type ‘int’
pDC->LineTo(x_center - C, y_center + S);
^
prog.cpp:12:7: error: request for member ‘LineTo’ in ‘* pDC’, which is of non-class type ‘int’
pDC->LineTo(x_center - C, y_center - S);
^
prog.cpp:13:7: error: request for member ‘LineTo’ in ‘* pDC’, which is of non-class type ‘int’
pDC->LineTo(x_center, y_center - R);
^
prog.cpp: At global scope:
prog.cpp:26:2: error: expected unqualified-id before ‘for’
for (int i = 0; i < 5; i++) {
^
prog.cpp:26:18: error: ‘i’ does not name a type
for (int i = 0; i < 5; i++) {
^
prog.cpp:26:25: error: ‘i’ does not name a type
for (int i = 0; i < 5; i++) {
^
prog.cpp:18:16: warning: ‘PI’ defined but not used [-Wunused-variable]
static double PI = 3.1416;
^
prog.cpp:20:16: warning: ‘R’ defined but not used [-Wunused-variable]
static double R = 50;
^