Re: [OT, redirect] Re: gethostbyname(string here)
- From: Kenneth Brody <kenbrody@xxxxxxxxxxx>
- Date: Wed, 07 Sep 2005 13:36:56 -0400
Artie Gold wrote:
>
> ruroma@xxxxxxxxx wrote:
> > Hello,
> >
> > I have one problem, and can think of two possible solutions but I
> > can't manage to make them work. I'm open to other suggestions if you
> > thik is better.
> >
> > [Brief Situation] The main function calls sendSocket, but I don't know
> > how to tell it where to send the socket. ( I think I'm messing it up
> > with pointers)
[...]
> As such things are handled in a platform specific way (they are not part
> of standard C) please ask in a forum specific to your platform.
>
> [And, of course, you *should* have read the FAQ before posting.]
While the example is using gethostbyname(), the real question being
asked is "how can I get a string from the user, and pass it to a
function", which would certainly not be off-topic. The fact that
the function is gethostbyname() and not print_foo(), is irrelevant
in this instance.
His followup post showed he found the correct answer -- that fgets()
leaves the newline intact, and he had to remove it before passing the
string to the function.
--
+-------------------------+--------------------+-----------------------------+
| Kenneth J. Brody | www.hvcomputer.com | |
| kenbrody/at\spamcop.net | www.fptech.com | #include <std_disclaimer.h> |
+-------------------------+--------------------+-----------------------------+
Don't e-mail me at: <mailto:ThisIsASpamTrap@xxxxxxxxx>
.
- Follow-Ups:
- Re: [OT, redirect] Re: gethostbyname(string here)
- From: Artie Gold
- Re: [OT, redirect] Re: gethostbyname(string here)
- References:
- gethostbyname(string here)
- From: ruroma
- [OT, redirect] Re: gethostbyname(string here)
- From: Artie Gold
- gethostbyname(string here)
- Prev by Date: Re: Prime numbers
- Next by Date: Re: Does anybody knows a C commpiler with <curses> under a DOS...??
- Previous by thread: Re: gethostbyname(string here)
- Next by thread: Re: [OT, redirect] Re: gethostbyname(string here)
- Index(es):
Relevant Pages
|