socket s[10]; gives error.
Why?
Printable View
socket s[10]; gives error.
Why?
The word socket should be in capital letters SOCKET, I think.
Try it and let me know if it works.
IJ...
Also are you including the winsock.h header file...??
IJ...
Just thought I would give you some advice that I have found over the past week or so working with sockets. I dont know what your program is, but juding by the fact you want an array of sockets, you are planing to have multiple users/connections connected at one time. You may want to think about using linked lists, instead of arrays, because it will allow you to grow or srink your connection list eaiser.