Mail Archives: djgpp/1997/02/16/00:56:11
Gunnar Beushausen wrote:
>
> Is there in DJGPP an ultoa function implemented? When i'm doing this,
> djgpp says implicit delcaration and it doesn't work:
>
> strcpy(str, ultoa(long, string, 10));
That may be an omission.... in any case, you can write your own 'ultoa'
that uses sprintf() to print the unsigned long to a buffer, and returns
the buffer.
> Or the same thing into another Question. How can i generate the
> following string:
>
> str = "Remaining physical memory: XX\n Remaining virtual memory: XY\n"
>
> where XX is _go32_dpmi_remaining_physical_memory
> and XY is _go32_dpmi_remaining_virtual_memory
Use sprintf() as follows:
char str[80];
sprintf( str, "Remaining physical memory: %lu\nRemaining virtual memory:
%lu\n", _go32_dpmi_remaining_physical_memory(),
_go32_dpmi_remaining_virtual_memory() );
--
---------------------------------------------------------------------
| John M. Aldrich, aka Fighteer I | fighteer AT cs DOT com |
| Proud owner of what might one | http://www.cs.com/fighteer |
| day be a spectacular MUD... | Plan: To make Bill Gates suffer |
---------------------------------------------------------------------
- Raw text -