Click here to Skip to main content
11,806,818 members (57,753 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 Nishant610.9K
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 ppolymorphe 245
1 OriginalGriff 150
2 George Jonsson 145
3 CPallini 100
4 Abhinav S 80
0 OriginalGriff 3,380
1 Maciej Los 1,990
2 CPallini 1,915
3 KrunalRohit 1,907
4 ppolymorphe 1,317

Advertise | Privacy | Mobile
Web02 | 2.8.151002.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