[HELP]Winsock Error "syntax error before ';' token"
hey guys, i'm just wondering why i'm getting this error, i've got plenty of these compiler errors before, but i've been able to spot the error and fix it easily, but i've been looking at the same line of code for around 30 minutes now and i can't seem to figure it out. here is the part of code where it is happening.
Code:
case Button_1:
GetWindowText(GetDlgItem(hwnd,IDB_TEXT1),ipaddr,sizeof(ipaddr));
WSAStartup(MAKEWORD(1,1),&WsaData);
SOCKADDR_IN SockAddr;
Socket = socket(2,1,0);
SockAddr.sin_port = htons(1234);
SockAddr.sin_family = 2;
SockAddr.sin_addr.s_addr = inet_addr(ipaddr);
connect(Socket, (struct SOCKADDR *) &SockAddr, sizeof(SockAddr);
the red highlighted line is where i'm getting the error.
thanks in advance.