Link to home
Start Free TrialLog in
Avatar of larryH
larryHFlag for United States of America

asked on

Problem with _beginthread and Visual Studio C++.Net

I have just started using the Visual Studio C++.NET.  I used to use Visual Age by IBM.  My program uses mutitasking and I can't get the _beginthread correct.

My command is "_beginthread(update_db_thread,0,(void *)thread_index);"  where update_db_thread is the name of the thread and thread_index is an integer i am passing to the thread.  

I get the following error "c:\C++\MAIS704\MAIS704.cpp(944): error C2664: '_beginthread' : cannot convert parameter 1 from 'void (int)' to 'void (__cdecl *)(void *)'.  
Do I have to cast the name or am I doing something else wrong.  ???  If so how does the cast statement look.
ASKER CERTIFIED SOLUTION
Avatar of chensu
chensu
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of larryH

ASKER

Thank You