The _beginthread() function has a parameter called arglist. You use that to pass arguments to your functions. In your code, you're always passing this as NULL.
The holy
MSDN specifies the following prototype for _beginthread:
uintptr_t _beginthread(
void( *start_address )( void * ),
unsigned stack_size,
void *arglist
);
So what I would do is keep the prototype for verk as:
void verk(void *k);
And in main do:
char c = getchar();
_beginthread(verk, 0, &c);
and then in the body of verk do:
char key = *((char *)k);
switch(key) { .. }
...
This code is probably a bit flawed since I don't have Windows or the right tools to test it, but you get the idea. Also, why use
conio.h, is there some special functionality it's providing? I just replaced your
getch() with
getchar() which is available in standard C, but you could also use
cin.
In this way you would have passed an argument to your thread. You can extend this method to pass multiple arguments if you need but it's one in the morning and I can't think of how. :)