Welcome to Dream.In.Code
Become a C++ Expert!

Join 149,934 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 1,658 people online right now. Registration is fast and FREE... Join Now!




Designing a rhomb with dev c++

 
Reply to this topicStart new topic

Designing a rhomb with dev c++

goril23
7 Jan, 2008 - 01:16 PM
Post #1

New D.I.C Head
*

Joined: 7 Jan, 2008
Posts: 4

Hello guys...

It's my first time that I post...

Well, does anyone know how i can design with dev c++ a rhomb by giving the fates of corner??

For not being misunderstood, i know how to do this with lines.

Thank you.
User is offlineProfile CardPM
+Quote Post

Tom9729
RE: Designing A Rhomb With Dev C++
7 Jan, 2008 - 02:31 PM
Post #2

Debian guru
Group Icon

Joined: 30 Dec, 2007
Posts: 1,589



Thanked: 12 times
Dream Kudos: 325
My Contributions
Sure, but you have to post your code or we won't help. smile.gif

When you do, post it inside code tags like this code.gif .
User is online!Profile CardPM
+Quote Post

goril23
RE: Designing A Rhomb With Dev C++
7 Jan, 2008 - 04:54 PM
Post #3

New D.I.C Head
*

Joined: 7 Jan, 2008
Posts: 4

The code that i use is :

CODE

#include <graphics.h>
#include <stdio.h>
#include <iostream>

void drawbox(int x, int y, int w, int z)
  {
       moveto(x, y);
       linerel(z, 0);
       linerel(w,-z);
      linerel(-z, 0);
       linerel(-w, z);
  }
main()
{
  initwindow(800,500);  
  setcolor(5);
  drawbox(300,260,70,80);    
  while(!getch());    
  closegraph();    
  return 0;
}

User is offlineProfile CardPM
+Quote Post

Tom9729
RE: Designing A Rhomb With Dev C++
7 Jan, 2008 - 05:31 PM
Post #4

Debian guru
Group Icon

Joined: 30 Dec, 2007
Posts: 1,589



Thanked: 12 times
Dream Kudos: 325
My Contributions
What drawing library are you using?
User is online!Profile CardPM
+Quote Post

goril23
RE: Designing A Rhomb With Dev C++
7 Jan, 2008 - 06:20 PM
Post #5

New D.I.C Head
*

Joined: 7 Jan, 2008
Posts: 4

graphics.h[size=7]
User is offlineProfile CardPM
+Quote Post

PennyBoki
RE: Designing A Rhomb With Dev C++
7 Jan, 2008 - 08:02 PM
Post #6

system("revolution");
Group Icon

Joined: 11 Dec, 2006
Posts: 2,011



Thanked: 7 times
Dream Kudos: 500
Expert In: Java,C++,C

My Contributions
Hi there I tried to compile your code in devC++ and I couldn't do it because of the error:

graphics.h: No such file or directory.

I googled and I've found that it is a very old library that is used by the borland C/C++ compilers. So if you are using devC++ try another library.

Now what language are you using C or C++?
In any case I don't think you need one of these lines:
#include <stdio.h>
#include <iostream>

And what operating system are you using?

Try to google some snippets based on the answers of the given questions.

This post has been edited by PennyBoki: 7 Jan, 2008 - 08:09 PM
User is offlineProfile CardPM
+Quote Post

nirvanarupali
RE: Designing A Rhomb With Dev C++
7 Jan, 2008 - 09:26 PM
Post #7

D.I.C Stomach
Group Icon

Joined: 1 Aug, 2007
Posts: 995



Thanked: 4 times
Dream Kudos: 375
My Contributions
This thread shows the same topic about graphic.h

http://www.dreamincode.net/forums/index.ph...graphic\.h
User is offlineProfile CardPM
+Quote Post

goril23
RE: Designing A Rhomb With Dev C++
8 Jan, 2008 - 05:15 AM
Post #8

New D.I.C Head
*

Joined: 7 Jan, 2008
Posts: 4

My OS is windows XP and i use Dev c++ 4-9-9-2. I found the directives for using library graphics.h in page:
http://www.uniqueness-template.com/devcpp/

Do you have to suggest an other library for graphics in c?
User is offlineProfile CardPM
+Quote Post

Reply to this topicStart new topic
Time is now: 1/8/09 03:37PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month