problem with winbgim.h

Hello!

i'm trying to make some simple graphic problem for school, but i keep getting errors..

Conio.c Multiple definitons of 'delay'
and
wingbin.cpp first defined here

That's the code:


#include <iostream>
#include <winbgim.h>

using namespace std;

int neki();
int blaa();
int main()
{
neki();
return 0;
}
int neki()
{
char izb;
cin>>izb;
switch (izb)
{
/* case 'a':
case 'A':
tri();
break;*/
case 'b':
case 'B':
blaa();
break;
/*case 'c':
case 'C':
krog();
break;*/
}
textcolor(0);

return 0;
}

int blaa()
{
int gd = DETECT, gm;

initgraph(&gd,&gm,"");

rectangle(100,100,200,200);

getch();
closegraph();
return 0;
}


If i do it without a function theres no error..


#include <iostream>
#include <winbgim.h>

int main()
{
int gd = DETECT, gm;

initgraph(&gd,&gm,"");

rectangle(100,100,200,200);

getch();
closegraph();
}


Please help!
Your code does not reflect the problem you are having.

Don't #include <conio.h> in your program (and don't link with it). You don't need it when you are using WinBGIm.

Good luck!
Topic archived. No new replies allowed.