Click here to Skip to main content
12,998,654 members (130,016 online)
Rate this:
Please Sign up or sign in to vote.
See more:

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
Updated 6-Feb-11 7:49am
Nish Nishant647.3K
Sandeep Mewara 6-Feb-11 13:23pm
Good to know. Now, what have you tried? Share with us.
Manfred R. 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?
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 6-Feb-11 15:11pm
Good answer, a 5
Nishant Sivakumar 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 :)

Have fun :)

Espen Harlinn
Nishant Sivakumar 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)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170622.1 | Last Updated 6 Feb 2011
Copyright © CodeProject, 1999-2017
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