When trying to process the return value (should be int) from sys/sockets.h bind(), Xcode fails to compile with the error
Invalid operands to binary expression ('__bind' and 'int')
It seems to be pulling the incorrect function definition for bind(), because when I choose "Jump to definition" from the contextual menu, it gives me three options: 2 definitions from functional.cpp, and 1 from sys/sockets.h. I have sys/sockets included in my code, how to I force the compiler to use the correct definition?
Use ::bind
or get rid of the using namespace std;
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With