Is there any way to send more then one parameter to a function using CreateThread.
Code:#include <iostream> #include <windows.h> using namespace std; void Func(int *, double); int main() { DWORD ThreadID; int x=1; double y=5.23; HANDLE hThread=CreateThread(0,0,(LPTHREAD_START_ROUTINE)Func,(int *)&x,0,&ThreadID); WaitForSingleObject(hThread,INFINITE); return 0; } void Func(int *i,double d) { cout<<"Values are: "<<*i<<" i "<<d<<endl; }