Jump to content
  • Advertisement
Sign in to follow this  
tBoai

i already int it BUT why error c2065?

This topic is 4422 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

void CTcpSock::setKeepAlive( bool keepAlive ) { nlassert(_Sock != INVALID_SOCKET) int b = keepAlive?1:0; the wrong with here: cant find "b" if ( setsockopt( _Sock, SOL_SOCKET, SO_KEEPALIVE, (char*)&b, sizeof(b) ) != 0 ) { throw ESocket( "setKeepAlive failed" ); } }

Share this post


Link to post
Share on other sites
Advertisement
You most likely need to end the previous line (nlassert(...)) with a semicolon (;). I'm not sure that's the problem, but it could be, especially if nlassert is a macro.

Also could you show us the code all the way down to that if statement? Is it right after declaring b?

Share this post


Link to post
Share on other sites
wow!! you right~ it is work now so thank you~


i got that code from Nel library

http://www.nevrax.org/

but that website always stop run at recently~

if you want the code i could send to you by mail

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!