well i have been working on a server client program and i got the server working but the client isnt.
Program Flow of a simple TCP client:
1)Initialize WinSock library using WSAStartup()
2)Create a IPPROTO_TCP SOCKET using socket()
3)Connect to the server using the socket we created, using connect()
4)Close the socket connection using closesocket()
5)De-Initialize WinSock using WSACleanup()
// Initialize WinSock
//Create the SOCKET
//connecting to server
//clean up mess
thats the code.
these are the erros i get.
error C2065: 'wsaData' : undeclared identifier
error C2101: '&' on constant
error C2440: 'type cast' : cannot convert from 'const double' to 'struct sockaddr *'
There is no context in which this conversion is possible
error C2143: syntax error : missing ')' before 'constant'
error C2660: 'connect' : function does not take 2 parameters
error C2059: syntax error : ')'
Error executing cl.exe.
Looks like a duplicate post. Where is wsaData declared? Your compiler is trying to tell you that you're using an identifier that hasn't been declared anywhere, it's not known. Fix this error first, then try compiling again.