Click here to Skip to main content
15,886,873 members
Please Sign up or sign in to vote.
2.33/5 (3 votes)
See more:
Hi,

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
Updated 6-Feb-11 7:49am
v3
Comments
Sandeep Mewara 6-Feb-11 13:23pm    
Good to know. Now, what have you tried? Share with us.
Manfred Rudolf Bihy 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?

You can't draw a graph in a console application.
 
Share this answer
 
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:

http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=101398[^]
 
Share this answer
 
v4
Comments
Espen Harlinn 6-Feb-11 15:11pm    
Good answer, a 5
Nish Nishant 6-Feb-11 21:23pm    
Thank you, Espen!
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 :)

Have fun :)

Regards
Espen Harlinn
 
Share this answer
 
v2
Comments
Nish Nishant 6-Feb-11 21:24pm    
Useful info, voted 5.
Espen Harlinn 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)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900