Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void *worker(const char* string) {
- printf("%s\n", string);
- return NULL;
- }
- int main(int argc, int argv[]) {
- pthread_t tid;
- char *string = "test";
- pthread_create(&tid, NULL, (void *(*)(void *))worker,string);
- printf("started %d\n",(int)tid);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement