A89: Re: Re: A92: Letters and Numbers
[Prev][Next][Index][Thread]
A89: Re: Re: A92: Letters and Numbers
you need to use str in place of num in the drawstr function. the drawstr
function needs a string (str) to print, not an integer number (num).
making str an array is where each character is held. when you use str
without an index value, it becomes a pointer to the beginning of the string.
that is what is msot often used in string handling.
--kaus
----- Original Message -----
From: <TurboSoft@aol.com>
To: <assembly-92@lists.ticalc.org>; <assembly-89@lists.ticalc.org>
Sent: Friday, August 06, 1999 1:08 PM
Subject: A89: Re: A92: Letters and Numbers
>
> In a message dated 8/6/99 11:04:46 AM Eastern Daylight Time,
> dysup@coah1.telmex.net.mx writes:
>
> > > > _main()
> > > > {
> > > > char str[14];
> > > > int num = 245;
> > > >
> > > > sprintf(str,"%d",num);
> > > > DrawStr(0,0,num,4);
> > > > };
>
> l'm getting problems with the DrawStr function. my compiler says that
> "passing arg 3...makes a pointer from an interger without a cast." And so
> DrawStr doesn't print anything. What's the problem?
> Also, what does making the str[14] array do? and how is that a part of
> sprintf( ? Thanks!
>
References: