LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   echoServer:Error with accept()@arg3'conv int*->socklen_t*' on g++.How to fix? (https://www.linuxquestions.org/questions/linux-newbie-8/echoserver-error-with-accept-%40arg3conv-int%2A-socklen_t%2A-on-g-how-to-fix-4175437688/)

esgol 11-18-2012 11:10 AM

echoServer:Error with accept()@arg3'conv int*->socklen_t*' on g++.How to fix?
 
If I compile with g++ instead of gcc the simple echo server from BeeJ guide to Unix Inter Process Communication p.52

I get this error for the accept() function
invalid convertion from int* to socklen_t*
http://img708.imageshack.us/img708/741/tempxh.jpg

Probably that coversion has gone deprecated on g++. How can I fix it?

Im on Kubuntu 10 g++ 4.4.5

esgol 11-19-2012 02:56 PM

I may provide a solution I found, - to not live a zombie thread

I have to cast the type

accept(....,(socklen_t*)&t)

and it workd with g++ also. If anything wrong or I shouldnt, or something better, you may add. Another 24h open left.


All times are GMT -5. The time now is 07:15 PM.