Draw Line In Dev C++

P: n/a
'john' <ea********@fastmail.fm> wrote in message
news:1d**************************@posting.google.c om
OK, what is the simplest way of drawing lines, vertical and horizontal
in Microsoft visual C++ or Dev C++

I don't know why anyone would want to bother drawing lines in console mode,
but you need to look at the character set of the font that your console
uses. It probably incorporates some special characters for the purpose. For
example, under Windows the default font is 8514oem. Characters 0xB3 to 0xDF
are line drawing charactes. For example, 0xB3 is a vertical line, 0xC4 is a
horizontal line and 0xBF, 0xC0, 0xD9, 0xDA are corners. Thus you can draw a
square with:
cout << 'n';
// top line and corners
cout << (char)0xDa;
for(int i=0; i<10; ++i)
cout << (char)0xC4;
cout << (char)0xBF;
cout << 'n';
// vertical edges
for(int i=0; i<10; ++i)
{
cout << (char)0xB3;
for(int j=0; j<10; ++j)
cout << ' ';
cout << (char)0xB3;
cout << 'n';
}
// bottom line and corners
cout << (char)0xC0;
for(int i=0; i<10; ++i)
cout << (char)0xC4;
cout << (char)0xD9;
cout << 'n';
--
John Carson
1. To reply to email address, remove donald
2. Don't reply to email address (post here instead)
Draw2017

Draw Line In Dev C Online

You can draw circles, lines, rectangles, bars and many other geometrical figures. You can change their colors using the available functions and fill them. Examples: For line 1, Input: x1 = 150, y1 = 150, x2 = 450, y2 = 150 For line 2, Input: x1 = 150, y1 = 200, x2 = 450, y2 = 200 For line 2, Input: x1 = 150, y1 = 250, x2 = 450, y2 = 250 Output. Apr 06, 2013  Re: How to draw a line between two points? « Reply #3 on: April 06, 2013, 06:41:07 pm » When we link to the documentation rather than giving the.