Thread: Call of nonfunction

  1. #1
    Registered User
    Join Date
    Sep 2003
    Posts
    24

    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.

  2. #2
    Registered User
    Join Date
    Sep 2003
    Posts
    24
    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);
    }

  3. #3
    Registered User
    Join Date
    Sep 2003
    Posts
    24
    ok i solved the problem. No idea what it was.
    Thanks anyway

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. minix system call pls help for project
    By porvas in forum Linux Programming
    Replies: 2
    Last Post: 06-14-2009, 02:40 AM
  2. Error C2664 - Trying to call an external Dll
    By jamez05 in forum C++ Programming
    Replies: 3
    Last Post: 08-08-2006, 06:07 AM
  3. Class won't call
    By Aalmaron in forum C++ Programming
    Replies: 3
    Last Post: 04-13-2006, 04:57 PM
  4. Iterative Tree Traversal using a stack
    By BigDaddyDrew in forum C++ Programming
    Replies: 7
    Last Post: 03-10-2003, 05:44 PM
  5. call by reference and a call by value
    By IceCold in forum C Programming
    Replies: 4
    Last Post: 09-08-2001, 05:06 PM