這個是用acllib寫的畫圖,不知錯那了,請求大佬賜教
uj5u.com熱心網友回復:
你把錯誤倒是發出來呀……errorsuj5u.com熱心網友回復:
C:\Users\Admin\Desktop\ack\main.c In function 'Setup':
33 2 C:\Users\Admin\Desktop\ack\main.c [Warning] passing argument 1 of 'Polygon' from incompatible pointer type [enabled by default]
71 0 e:\bianyiqi\dev-cpp\mingw64\x86_64-w64-mingw32\include\windows.h In file included from e:\bianyiqi\dev-cpp\mingw64\x86_64-w64-mingw32\include\windows.h
50 C:\Users\Admin\Desktop\ack\acllib.h from acllib.h
1 C:\Users\Admin\Desktop\ack\main.c from main.c
3353 28 e:\bianyiqi\dev-cpp\mingw64\x86_64-w64-mingw32\include\wingdi.h [Note] expected 'HDC' but argument is of type 'struct POINT *'
33 2 C:\Users\Admin\Desktop\ack\main.c [Warning] passing argument 2 of 'Polygon' makes pointer from integer without a cast [enabled by default]
71 0 e:\bianyiqi\dev-cpp\mingw64\x86_64-w64-mingw32\include\windows.h In file included from e:\bianyiqi\dev-cpp\mingw64\x86_64-w64-mingw32\include\windows.h
50 C:\Users\Admin\Desktop\ack\acllib.h from acllib.h
1 C:\Users
uj5u.com熱心網友回復:
發成這樣看得清嗎?看不清我就重新發帖吧,謝謝你的回復啊!
uj5u.com熱心網友回復:
你要是方便把代碼貼出來吧……迷之報錯uj5u.com熱心網友回復:
#include"acllib.h"
int Setup()
{
initWindow("test",DEFAULT,DEFAULT,500,500);
beginPaint();
setPenColor(WHITE);
setBrushColor(WHITE);
rectangle(0,0,500,500);
endPaint();
beginPaint();
setPenColor(BLUE);
setBrushColor(BLUE);
acr(150,150,350,300);
line(200,300,300,300);
endPaint();
beginPaint();
setPenColor(RED);
setBrushColor(RED);
POINT p1[]={
{250,220},
{245,245},
{220,250},
{245,255},
{250,280},
{255,255},
{280,250},
{255,245},
{250,220},
};
Polygon(p1,9);
endPaint();
beginPaint();
setPenColor(BLACK);
setBrushColor(BLACK);
rectangle(240,300,260,400);
endPaint();
beginPaint();
setTextColor(GREEN);
setTextsize(20);
paintText(230,5,"曾小佳");
endPaint();
return 0;
}
uj5u.com熱心網友回復:
剛學c語言不久,我還以為直接發那個他顯示出錯的地方就可以了!
uj5u.com熱心網友回復:
polygen的第二個引數用加上括號即,(const POINT *)轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/121072.html
標籤:C語言
下一篇:.有關自增自減運算子的萌新問題
