| | |
shapes in C++
![]() |
•
•
Join Date: Mar 2009
Posts: 1
Reputation:
Solved Threads: 0
Hi all,
i m new to the programming storie,
can any one please help me? i want to write a program that allows the user to input the diamention (e.g heit, weight) used to draw the object shape. the program should then compute the area and display the shape based on the inputed diamention.
some how i must use header files.
here is what i have tried so far:
#include <graphics.h>
#include<iostream.h>
#include<stdlib.h>
#include<conio.h>
#include "MyHeader.h";
void main ()
{
int gd=DETECT, gm;
initgraph (&gd, &gm, "c:\\tc\\bgi");
int err=graphresult();
if (err !=grOk)
{
cout<<"graphics not initialised";
return;
}
fillsettingstype f;
getfillsettings (&f);
cout<<"Which shape are you working with"<<endl;
cin>>'1' || '2' || '3';
if (cin == 1)
{
circle();
}
return 0;
}
void circle ( int x, int y, int z)
{
int color, area;
setcolor(LIGHTGREEN);
cout<<"enter your circle cordinates:";
cin>> x, y, z;
getch();
closegraph();
}
i m new to the programming storie,
can any one please help me? i want to write a program that allows the user to input the diamention (e.g heit, weight) used to draw the object shape. the program should then compute the area and display the shape based on the inputed diamention.
some how i must use header files.
here is what i have tried so far:
#include <graphics.h>
#include<iostream.h>
#include<stdlib.h>
#include<conio.h>
#include "MyHeader.h";
void main ()
{
int gd=DETECT, gm;
initgraph (&gd, &gm, "c:\\tc\\bgi");
int err=graphresult();
if (err !=grOk)
{
cout<<"graphics not initialised";
return;
}
fillsettingstype f;
getfillsettings (&f);
cout<<"Which shape are you working with"<<endl;
cin>>'1' || '2' || '3';
if (cin == 1)
{
circle();
}
return 0;
}
void circle ( int x, int y, int z)
{
int color, area;
setcolor(LIGHTGREEN);
cout<<"enter your circle cordinates:";
cin>> x, y, z;
getch();
closegraph();
}
![]() |
Similar Threads
- Drawing shapes in c++ (C++)
- Deleting Shapes of a certain Parent (C++Builder) (C++)
- Creating shapes in borland c++ builder... (C++)
- Need Photoshop Shapes/Brushes (Graphics and Multimedia)
- Using Shapes In Excel (Visual Basic 4 / 5 / 6)
Other Threads in the Community Introductions Forum
- Previous Thread: Greetings from Sweden
- Next Thread: hi
| Thread Tools | Search this Thread |
adsense aladar amatueurgrapicdesigner beginner business c# c#picturebox c++ champlain college contentwriting copywriter dba deleterectangle dheeraj experiences forensic givemetehcodez helloall internet internetmarketing introduction introductory itservices jauhari java lahore.civilengineer market marketing mca multiplerectangle naveen newbie newcomernote newgirl nigeria noob note oil online peertopeervideostreaming pekdi pictureboxselectobject prankerio profanitytest programmer projects research seo seoservices share shiva..... sqlserver stillnew student suthar tester traffic typhoon waliya'sgratituteandrequest. web webcam webdesign welcomenote wllu wolf wordpresstheme






