Hallo
Ich hab da nen problem mit der CreateThread funktion:
Code:
Habe ich irgendwo etwas vergessen?
Ich hab da nen problem mit der CreateThread funktion:
C:\Dev-Cpp\me.cpp In function `int main()':
15 C:\Dev-Cpp\me.cpp invalid conversion from `DWORD (*)()' to `DWORD (*)(void*)'
15 C:\Dev-Cpp\me.cpp initializing argument 3 of `void* CreateThread(_SECURITY_ATTRIBUTES*, DWORD, DWORD (*)(void*), void*, DWORD, DWORD*)'
Code:
C++:
#include <cstdlib>
#include <iostream>
#include <windows.h>
using namespace std;
DWORD WINAPI ThreadFunc();
int main()
{
LPVOID index;
HANDLE thread = CreateThread(NULL, 0, ThreadFunc,NULL,0,NULL);
system("PAUSE");
return EXIT_SUCCESS;
}
DWORD WINAPI ThreadFunc(LPVOID data){
printf("Thread 1");
system("PAUSE");
}
Habe ich irgendwo etwas vergessen?