hey people , i am a c++ biginner , i am self tought , this mean i have no teacher to help me .
now i arrived to graphics .
but i have got a small problem , i am programming with my laptop. my laptop is a mini laptop with windows 7 starter , it is compaq. so when ever i run a graphics program , the computer tell me that the program needs to run in full screan mode and the only options i have is to try again or cancel .i am using turbo c . as well as vc++ , but i cant run the graphics application in vc++
check , here is one of my graphics programs
#include<iostream.h> // tha main stream , you can remove it , it is not important , but i like it
#include<conio.h> // for getch();
#include<graphics.h> // for the graphics
const int RAD=75; // set the radios of the circle
class ball
{
private:
int xco , yco;
int linecolor;
int fillcolor;
public:
ball()
{
xco = 0;
yco = 0;
linecolor = WHITE;
fillcolor = WHITE;
}
void set(int x, int y, int Lc, int fc)
{
xco = x;
yco = y;
linecolor = Lc;
fillcolor = fc;
}
void draw()
{
setcolor ( linecolor );
setlinestyle ( SOLID_LINE , 0 , THICK_WIDTH );
circle (xco , yco , RAD); // this is to draw the ball
setfillstyle (SOLID_FILL , fillcolor); // this is to set the style of filling the ball with colors
floodfill (xco , yco , linecolor); // this is to fill the ball with colors
}
};
void main()
{
int drive , mode;
drive = DETECT;
initgraph(&drive , &mode ,"\\tc\\bgi");
ball b1;
ball b2;
ball b3;
b1.set(320 , 150 , YELLOW , RED); //here we set the the 1st ball
b2.set(225 , 150 , YELLOW , GREEN); // here is the 2nd ball
b3.set(385 , 150 , YELLOW , BLUE);
b1.draw();
b2.draw();
b3.draw();
getch();
closegraph();
}#include<iostream.h> // tha main stream , you can remove it , it is not important , but i like it
#include<conio.h> // for getch();
#include<graphics.h> // for the graphics
const int RAD=75; // set the radios of the circle
class ball
{
private:
int xco , yco;
int linecolor;
int fillcolor;
public:
ball()
{
xco = 0;
yco = 0;
linecolor = WHITE;
fillcolor = WHITE;
}
void set(int x, int y, int Lc, int fc)
{
xco = x;
yco = y;
linecolor = Lc;
fillcolor = fc;
}
void draw()
{
setcolor ( linecolor );
setlinestyle ( SOLID_LINE , 0 , THICK_WIDTH );
circle (xco , yco , RAD); // this is to draw the ball
setfillstyle (SOLID_FILL , fillcolor); // this is to set the style of filling the ball with colors
floodfill (xco , yco , linecolor); // this is to fill the ball with colors
}
};
void main()
{
int drive , mode;
drive = DETECT;
initgraph(&drive , &mode ,"\\tc\\bgi");
ball b1;
ball b2;
ball b3;
b1.set(320 , 150 , YELLOW , RED); //here we set the the 1st ball
b2.set(225 , 150 , YELLOW , GREEN); // here is the 2nd ball
b3.set(385 , 150 , YELLOW , BLUE);
b1.draw();
b2.draw();
b3.draw();
getch();
closegraph();
}
please tell me how to solve this proble (the graphics problem) and how to run my graphics in vc++ .
thanks