G
glen herrmannsfeldt
Lew Pitcher said:On Saturday 12 April 2014 18:36, in comp.lang.c, "Bill Cunningham"
(snip)
Here, you define pa as an object that will contain a pointer to a struct
addrinfo structure.
(snip)
/
Here, you try to stuff some data into an object that is
accessed through the pa pointer.
(snip)
But, you never actually populate pa with an address. So all of these
attempts to put data into objects pointed to by pa will result in errors,
because pa *doesn't point at anything*.
If the OP is lucky, it segfaults.
If not, it stores it some place in memory where something else is
supposed to be, causing strange effects sometime later.
Not noticing the missing #include before, this is what I wrote
about previously.
-- glen