You shoud change you declaration from
sockaddr_in s;
to
struct sockaddr_in s;
Sven
>>>>> "Jonathan" == Jonathan Lupa <[EMAIL PROTECTED]> writes:
Jonathan> [1 <text/plain; us-ascii (quoted-printable)>] I have
Jonathan> this feeling that I'm going to feel terribly stupid once
Jonathan> someone tells me what I'm doing wrong, but....
Jonathan> ======= #include <sys/types.h> #include <sys/socket.h>
Jonathan> int main( const int argc, const char * argv[] ) {
Jonathan> sockaddr_in s; return 0; } =======
Jonathan> Rankor:~/src/sockets$g++ stupid.cpp stupid.cpp: In
Jonathan> function `int main(int, const char **)': stupid.cpp:6:
Jonathan> `sockaddr_in' undeclared (first use this function)
Jonathan> stupid.cpp:6: (Each undeclared identifier is reported
Jonathan> only once... stupid.cpp:6: parse error before `;'
Jonathan> ======= - sockaddr_in s; + struct sockaddr_in s; =======
Jonathan> Rankor:~/src/sockets$g++ stupid.cpp stupid.cpp: In
Jonathan> function `int main(int, const char **)': stupid.cpp:6:
Jonathan> aggregate `struct sockaddr_in s' has incomplete type and
Jonathan> cannot be initialized ======= Rankor:~/src/sockets$g++
Jonathan> --version 2.95.2
Jonathan> What am I missing?
Jonathan> THANKS!
Jonathan> Jonathan
Jonathan> -- [EMAIL PROTECTED] GPG public key available from
Jonathan> http://lupavista.jamdata.net/gpg.asc
Jonathan> ------------------------------------------------------------------
Jonathan> Lament 1750: "If I only had a radioactive decay source
Jonathan> and a fast free-running oscillator..." [2
Jonathan> <application/pgp-signature (7bit)>]