#include <iostream> #include <pthread.h> void *function1(void *arg); void *function2(void *arg); int main(int argc, char *argv[]) { pthread_t p1,p2; pthread_create(&p1,NULL,function1,NULL); pthread_create(&p2,NULL,function2,NULL); pthread_exit(NULL); return 0; } void *function1(void *arg) { std::cout<<"thread1"<<std::endl; } void *function2(void *arg) { std::cout<<"thread2"<<std::endl; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)