Click here to Skip to main content
11,709,529 members (50,090 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: C++ graphics VC10.0

I would like to draw a graph in C++ from a matrix. And I would like to do this in a Win32 console application. Any ideas or pointers are welcome. Thanks.
Posted 6-Feb-11 7:13am
Edited 6-Feb-11 7:49am
Nish Nishant608.7K
Sandeep Mewara at 6-Feb-11 13:23pm
Good to know. Now, what have you tried? Share with us.
Manfred R. Bihy at 6-Feb-11 13:24pm
First you have to decide wether to take the blue or the red pill. Do I read you correctly that you want to draw tanks? If you want a windows console application where should your grafics be rendered?
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You can't draw a graph in a console application.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

In the old Borland and Turbo C++ for DOS days, it was quite easy to use console-graphics modes. VC++ has traditionally not supported these modes. Although people have hacked around with inline assembly and direct video buffer writes to do console mode graphics from VC++ too.

Modern day VC++ editions do not support any kind of graphics modes in console applications. But all's not lost, and if you are really keen on doing this, you can use OpenGL which does seem to support console-mode graphics. That said, it would probably be a far more practical idea to write a windows mode application and then use something like GDI+ or even DirectX/XNA/WPF to render high performant graphics. That's your call though.

Related thread on the OpenGL forums:[^]
Espen Harlinn at 6-Feb-11 15:11pm
Good answer, a 5
Nishant Sivakumar at 6-Feb-11 21:23pm
Thank you, Espen!
Rate this: bad
Please Sign up or sign in to vote.

Solution 3

Since Nishant Sivakumar mentioned the "good old days" of DOS, Turbo Vision[^] is an option if you want to develop an "intuitive" console/text mode application.

It now works on DOS, FreeBSD, Linux, QNX, Solaris and Win32 Smile | :)

Have fun Smile | :)

Espen Harlinn
Nishant Sivakumar at 6-Feb-11 21:24pm
Useful info, voted 5.
Espen Harlinn at 7-Feb-11 11:15am
Thanks Nishant!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 590
1 OriginalGriff 250
2 Maciej Los 225
3 Peter Leow 219
4 Mika Wendelius 160
0 OriginalGriff 9,428
1 Sergey Alexandrovich Kryukov 9,027
2 CPallini 5,189
3 Maciej Los 4,991
4 Mika Wendelius 3,856

Advertise | Privacy | Mobile
Web01 | 2.8.150819.1 | Last Updated 6 Feb 2011
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100