beginthread problem

This is a discussion on beginthread problem within the Windows Programming forums, part of the Platform Specific Boards category; hi, im using VC++ 6 and im trying to use _beginthread heres the code im trying Code: _beginthread(HostServer, 0, NULL); ...

  1. #1
    Registered User Rare177's Avatar
    Join Date
    May 2004
    Posts
    214

    beginthread problem

    hi, im using VC++ 6 and im trying to use _beginthread

    heres the code im trying

    Code:
    _beginthread(HostServer, 0, NULL);
    and HostServer = int HostServer()

    the warning im getting is

    Code:
    warning C4113: 'int (__cdecl *)()' differs in parameter lists from 'void (__cdecl *)(void *)'
    and it seems to be making the program work wrong,
    any one got any ideas on this
    thanks

  2. #2
    moi
    moi is offline
    Registered User moi's Avatar
    Join Date
    Jul 2002
    Posts
    946
    Your function HostServer returns an int, and it shouldnt return anything. Error messages are meant to be read, not ignored, ya know?
    hello, internet!

  3. #3
    Registered User
    Join Date
    Oct 2004
    Posts
    120
    Don't forget that not only does it NOT return an int, it expects a void* as an argument.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need help understanding a problem
    By dnguyen1022 in forum C++ Programming
    Replies: 2
    Last Post: 04-29-2009, 04:21 PM
  2. Memory problem with Borland C 3.1
    By AZ1699 in forum C Programming
    Replies: 16
    Last Post: 11-16-2007, 10:22 AM
  3. Someone having same problem with Code Block?
    By ofayto in forum C++ Programming
    Replies: 1
    Last Post: 07-12-2007, 08:38 AM
  4. A question related to strcmp
    By meili100 in forum C++ Programming
    Replies: 6
    Last Post: 07-07-2007, 02:51 PM
  5. WS_POPUP, continuation of old problem
    By blurrymadness in forum Windows Programming
    Replies: 1
    Last Post: 04-20-2007, 06:54 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21