-
Call of nonfunction
Code:
#include <condefs.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <windows.h>
#include <winsock.h>
fd_set fdread;
struct ItemNode *itemlist = NULL;
int S; //socket
WSADATA wsaData;
if((S = Connect(CHATSERVER, CHATPORT)) == -1) //error line
{
fprintf(stderr, "Connection to chat server failed!");
exit(1);
}
[C++Error] ybot.cpp(70): Call of nonfunction.
anyone know why i would get this error?
I use Borland C++ Builder 3. i have included:
Thnaks.
-
ok sorry i've just seen a mistake in my code. It should read
Code:
#include <condefs.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <windows.h>
#include <winsock.h>
fd_set fdread;
struct ItemNode *itemlist = NULL;
int S; //socket
WSADATA wsaData;
if (WSAStartup(MAKEWORD(1, 1), &wsaData) != 0) //error line
{
fprintf(stderr, "WSAStartup failed.\n");
exit(1);
}
-
ok i solved the problem. No idea what it was.
Thanks anyway