LinuxSA Mailing list archives

Index: [thread] [date] [subject] [author] [stats]
  From: Charles Williams <hosting.mailing.list.account@acnshosting.com>
  To  : James Mclean <james@adam.com.au>
<linuxsa@linuxsa.org.au> Date: Sat, 30 Jun 2001 12:50:13 +0200

Re: C question

----- Original Message -----
From: "James Mclean" <james@adam.com.au>
To: <linuxsa@linuxsa.org.au>
Sent: Saturday, June 30, 2001 11:13 AM
Subject: C question


> List,
>
> I am writing a small program in C, I just need a few pointers. I am
> outputting some data that comes from a fuction, but i believe that i am
> using the wrong type to output the result.
>
> here is the code...
>
> printf("%s",GenPasswd(dif,len));
>
> GenPasswd() is a function included from a custom header file.
>
> What type should i use to output the data, or is thier a better way???
>

James,

If it's not returning a string then you are out of luck.  make sure of the
return type before hand.  Just open the header file and find the function.
Once you have it then look for the return ( in this case there will probably
be more than one due to error control.  You need the main return).  If you
can't find it then try casting it to a string (iffy) and you should get
something then.

chuck


-- 
LinuxSA WWW: http://www.linuxsa.org.au/  IRC: #linuxsa on irc.linux.org.au
To unsubscribe from the LinuxSA list:
  mail linuxsa-request@linuxsa.org.au with "unsubscribe" as the subject


Index: [thread] [date] [subject] [author] [stats]
Return to the LinuxSA Mailing List Information Page