![]() |
|
#1
|
|||
|
|||
printing integers in graphics modeim unsing turbo c compiler under graphics mode....
is there any way to print intergers at desired coordiates, in graphics mode, except of this, converting int to string using itoa() function (Interger to ASCII) and then print it using gototextxy(), which take some extra memory as it need one int and one string and some extra lines of code..... Last edited by JdS : 05-Oct-2004 at 07:01.
Reason: Please set up signature in your profile only.
|
|
#2
|
||||
|
||||
|
Quote:
Look at the cprintf() and gotoxy() functions. __________________
Age is unimportant -- except in cheese |
|
#3
|
|||
|
|||
|
Quote:
|
|
#4
|
|||
|
|||
|
Quote:
It's been years since I have dinked with BGI, and I have no way to test anything that you might come up with, but here's something that comes to mind: Make your own version of printf() (maybe call it bgiprintf(), or gprintf(), or something). Lets call it gprintf(). gprintf() calls sprintf() to cause your output to go to a string (a locally allocated array of char). Then use outtext() to put the string to the screen. If you haven't used vararg before, read up on it. Some pre-ansi compilers may not support variable number of arguments, but Turbo C that I used "way back when" did. Regards, Dave |
|
#5
|
||||
|
||||
|
Quote:
CPP / C++ / C Code:
__________________
Age is unimportant -- except in cheese |
Recent GIDBlog
Toyota - 2008 August Promotion by Nihal
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to boot Linux in text mode with GRUB Loader | JdS | Computer Software Forum - Linux | 8 | 11-Jul-2006 04:41 |
| How to set the control button in the pushed mode? | mithila | MS Visual C++ / MFC Forum | 1 | 27-Sep-2004 06:32 |
| [Tutorial] Standard I/O | aaroncohn | C Programming Language | 20 | 27-Feb-2004 21:07 |
| web server in secure mode not connecting to http application | tcsasp | Apache Web Server Forum | 0 | 06-Nov-2003 00:08 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The