error C2143: syntax error : missing ';' before 'type'
hi,
I am creating a GUI using VC++ as compiler, i have all C files. In one of the file where i created blank windows frame work(i created blank window). for write pixel i'm using a function(as application needs). so i included following function in windos frame work code and i'm getting the error :
error C2143: syntax error : missing ';' before 'type'
error C2059: syntax error : '}'
function
extern void Line(Coord,Coord,Coord,Coord,Color)
{
int x1,y1,xe1,ye1;
MoveToEx(hDC,xe,ye,NULL);
LineTo(hDC,x,y);
}
i am getting first error at start of function, and 2nd at end of the function line.
Re: error C2143: syntax error : missing ';' before 'type'
What is "function"? That's not a C/C++ keyword or any standard library typedef that I know of.
Re: error C2143: syntax error : missing ';' before 'type'
i am using function Line(Coord,Coord,Coord,Coord,Color) to draw some graphic. I know we can draw lines and all using msdn library(LineTo) directly. but my application need it to draw through function Line.
Re: error C2143: syntax error : missing ';' before 'type'
I don't have any idea what you are trying to do, but try removing the word "function". It's not a C/C++ keyword (I think it is in PASCAL).
Re: error C2143: syntax error : missing ';' before 'type'
No, PASCAL functions can't have void returns (at least not in the 15-20 year old PASCAL version I remember...) :)
Re: error C2143: syntax error : missing ';' before 'type'
My parenthetical remark was ambiguous. I meant that "function" is a valid keyword in PASCAL. I should have prhased it: "(I think it is a keyword in PASCAL)".
I suspect that the OP is confusing the two languages.
Re: error C2143: syntax error : missing ';' before 'type'
Ah! No, that was my bad reading. I totally mis-interpreted it, I see that now reading it a second time. :blush: