You’re calling asd
instead of passing its address. Since the function has a void
return, you are incorrectly passing void
where a function pointer is expected. Remove the parentheses.
int main()
{
_beginthread(asd, 333, (void*)NULL);
}
And the function asd
must accept a void pointer parameter as well.
void asd(void*)
{
printf("hello");
}