Here is an example on how to put at least lines and circles onto your windows console display. Yes, you have to jump through a hoop to do it. Dev-C++ can do this thanks to some BCX generated code. You have to set up your project as a Console Application and link with libgdi32.a in the case of Dev-C++, or GDI32.lib with other compilers.
Rectangle is used to draw a rectangle. Coordinates of left top and right bottom corner are required to draw the rectangle. Left specifies the X-coordinate of top left corner, top specifies the Y-coordinate of top left corner, right specifies the X-coordinate of right bottom corner, bottom specifies the Y-coordinate of right bottom corner. Jul 14, 2017 Using these code you can draw a circle. #include #include using namespace std; int main float y,k; cout y; float m = 2; for (int i = -y; i. Aug 19, 2011 Many people uses Turbo c to run c and c programs. More people want to do graphics programs.If they use windows 7 64 bit they may not be able to run Turbo c. Dev C is more user friendly.Here you can see how to run graphics programs in Dev C. 0007 Square pattern using Numeric digits in line in. Draw isosceles triangle using counting 54321 in reverse order. Solution C Functions C Language C Loops and Decisions C Program Examples C Programs c projects C Puzzles C Shapes Code C Structures C Tips and Tricks C Tutorials Control Structures CPP Enum CPP Pointers.
5,285 Views/cook-n-x3-download.html. Scientist
Replaced iostream and cin.get() with the cstdio header and getchar() to reduce the exe file size from 415k to 7k
wxstorm
The code works flawlessly. Is there a way to add to these features to plot graphs of functions? Or will that require more sophisticated code and libraries?
An example of what I mean is: using the BCX_Line function to draw a figure window, the X and Y axes, and then another function to plot--let's say sin(x) curve.
how can I move the drawen object using the mouse from his place to onther please
gh0sst
Hi!
How can I clear the screen of graphical images ?
I'm reffering to a function similar to BORLAND C's cleardevice() funcion.
Thanks in advance,
gh0sst
The code snippet does not compile with Dev-C++ 4.9.9.2. The error messages look like this:
[Linker error] undefined reference to 'CreatePen@12'
[Linker error] undefined reference to 'SelectObject@8'
..
and so on.
Ancient Dragon5,243
This thread was originally posted 5 years ago, before that version of the compiler existed. So use the code at your own risk.
>> The code snippet does not compile with Dev-C++ 4.9.9.2. The error messages look like this:
>> [Linker error] undefined reference to 'CreatePen@12'
>> [Linker error] undefined reference to 'SelectObject@8'
See the code snippet comments, there it says;
- with Dev-C++ link libgdi32.a via Project>>Project Options>>Parameters>>Add Lib>>libgdi32.a
petersvp
Draw A Line In Dev C++
There is WIN32 API GetConsoleWindow() that directly returns the Console's HWND already.