From: Francesco Gadaleta <francesco@gadaleta.org>
To: linux-c-programming@vger.kernel.org
Subject: Re: assignment makes pointer from integer without a cast?
Date: Mon, 13 Dec 2004 17:13:54 +0100 [thread overview]
Message-ID: <20041213161354.GD1487@sweetdream> (raw)
In-Reply-To: <20041213014757.89052.qmail@web12706.mail.yahoo.com>
[-- Attachment #1: Type: text/plain, Size: 1184 bytes --]
> void usage(char *prog_ptr) /* not int* */
> {
> fprintf(stdout,"progname is: %s\n",prog_ptr); /* not
> *prog_ptr */
> }
>
> int main(int argc, char *argv[])
> {
> char *prog_ptr; /* not int * */
> prog_ptr = basename (argv[0]);
> usage(prog_ptr); /* not &prog_ptr */
> return(0);
> }
>
>
change this line:
prog_ptr = basename (argv[0]);
with this:
prog_ptr = (char*) basename (argv[0]);
--
_________________________________________________
Imagine no possessions
I wonder if you can
No need for greed or hunger
A brotherhood of man
Imagine all the people
Sharing all the world...
John Lennon
_________________________________________________
_________________________________________________
Francesco Gadaleta - Italian GNU/Linux User
web site: www.gadaleta.org
email : francesco@gadaleta.org
ICQ : 286063291
Fingerprint: 3CB8 C721 FE99 BC98 38DC F463 BFDC E4EC CE3B 7327 (1024/DSA) [with image]
Linux Registered User #327326
________________________________________________
Non speditemi documenti in formato Word
o Powerpoint.
RMS vi spiega il motivo qui:
http://www.gadaleta.org/allegati.html
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2004-12-13 16:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-13 0:52 assignment makes pointer from integer without a cast? Patrick
2004-12-13 1:47 ` Hossein Mobahi
2004-12-13 16:13 ` Francesco Gadaleta [this message]
2004-12-13 19:53 ` Jan-Benedict Glaw
2004-12-16 2:07 ` how to link mqueue library Ron Michael Khu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20041213161354.GD1487@sweetdream \
--to=francesco@gadaleta.org \
--cc=linux-c-programming@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.