Page 1 of 1
Help with the error message Expression syntax in function main Error message keep occuring in simple program.
#1
Help with the error message Expression syntax in function main
Posted 18 June 2007 - 06:07 AM
i am using borland c++ 1.01 b/c i need to write c++ programs with graphics in it.
i am trying to make just a simple smiley face to send to my friends by i have a problem.
i keep getting the error message when compiling error Expression syntax in function main.
[size=4]here is my code.
// this code is pappi
//joes...
#include<iostream>
#include<conio.h>
#include<graphics.h>
#include<dos.h>
int main()
{
clrscr();
int graphdriver = DETECT, graphmode; note:This is where the problem mostly is..
initgraph(&graphdriver, &graphmode, "c:\\tc\\bgi");
do
{
cleardevice();
setcolor(DARKGRAY);
setfillstyle(1, YELLOW);
circle(320, 240, 200); //Draw the face
floodfill(320, 240, DARKGRAY); //fill the face with yellow
setlinestyle(0, 1, 3);
arc(250, 180, 0, 280, 40);
arc(320, 180, 0, 180, 40);
setlinestyle(0, 1, 3);
arc(320, 260, 200, 340, 100);
delay(1000);
setfillstyle(1, YELLOW);
circle(320, 240, 200); //the face
setlinestyle(0, 1, 3);
floodfill(320, 240, DARKGRAY);
circle(250, 180, 40); //eyes
setfillstyle(1, DARKGRAY);
floodfill(250, 180, DARKGRAY);
circle(380, 180, 40); //eyes
setfillstyle(1, DARKGRAY);
setlinestyle(0, 1, 3);
arc(320, 260, 200, 340, 100); //mouth
delay(2000);
}
while(!kbhit());
closegraph();
return 0;
}
if you could please help me that would be great...
i am trying to make just a simple smiley face to send to my friends by i have a problem.
i keep getting the error message when compiling error Expression syntax in function main.
[size=4]here is my code.
// this code is pappi
//joes...
#include<iostream>
#include<conio.h>
#include<graphics.h>
#include<dos.h>
int main()
{
clrscr();
int graphdriver = DETECT, graphmode; note:This is where the problem mostly is..
initgraph(&graphdriver, &graphmode, "c:\\tc\\bgi");
do
{
cleardevice();
setcolor(DARKGRAY);
setfillstyle(1, YELLOW);
circle(320, 240, 200); //Draw the face
floodfill(320, 240, DARKGRAY); //fill the face with yellow
setlinestyle(0, 1, 3);
arc(250, 180, 0, 280, 40);
arc(320, 180, 0, 180, 40);
setlinestyle(0, 1, 3);
arc(320, 260, 200, 340, 100);
delay(1000);
setfillstyle(1, YELLOW);
circle(320, 240, 200); //the face
setlinestyle(0, 1, 3);
floodfill(320, 240, DARKGRAY);
circle(250, 180, 40); //eyes
setfillstyle(1, DARKGRAY);
floodfill(250, 180, DARKGRAY);
circle(380, 180, 40); //eyes
setfillstyle(1, DARKGRAY);
setlinestyle(0, 1, 3);
arc(320, 260, 200, 340, 100); //mouth
delay(2000);
}
while(!kbhit());
closegraph();
return 0;
}
if you could please help me that would be great...
Page 1 of 1

Ask A New Question
Reply





MultiQuote




|