setBrushColor(GREEN);
setPenColor(GREEN);
sec = (double)timel->tm_sec * 6 / 180 * PI;
x = r_sec * sin(sec) + cntX;
y = -r_sec * cos(sec) + cntY;
second[0][0] = x;
second[0][1] = y;
second[2][0] = cntX - (x - cntX) / 10;
second[2][1] = cntY - (y - cntY) / 10;
second[1][0] = cntX + (second[2][1] - cntY) / 4;
second[1][1] = cntY - (second[2][0] - cntX) / 4;
second[3][0] = cntX - (second[2][1] - cntY) / 4;
second[3][1] = cntY + (second[2][0] - cntX) / 4;
polygon(*second, 2);
提示錯誤是 139 20 C:\Users\admin\Desktop\work\main1.cpp [Error] cannot convert 'int (*)[2]' to 'const POINT* {aka const tagPOINT*}' for argument '1' to 'void polygon(const POINT*, int)'
uj5u.com熱心網友回復:
錯誤提示很清楚啊。。BOOL Polygon( LPPOINT lpPoints, int nCount )
這是函式原型。第一個引數,應該是一個“POINT”型別的指標,在你的代碼中,second變數,很明顯,是一個int型別的二維陣列,型別匹配啊。。
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/29247.html
下一篇:哈夫曼編碼,資訊熵的理解
