This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Linux Socket Help


I am having trouble with the accept() funtion. The book I am using for
help shows that the accept function takes 3 parameters:

accept(int s, struct sockaddr *addr, int *addrlen);

I get a compilation error saying "passing 'int *' as argument 3 of
'accept(int, sockaddr*, socklen_t *)' changes signedness"

Where is socklen_t defined, i have tried typecasting the int* i am
passing to this function to socklen_t but g++ doesnt reconize it.

Also what is the difference between gcc and g++, i can compile my
application fine in g++ but if i try to compile it in gcc i get errors
when using the cout statement, i didnt forget to include the <iostream>
library, i thought gcc was both a c++ and c  compiler.

Thanks
Ryan Gilfether

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]