Thread Programming in CPP

Simple Thread Programming in CPP

PROGRAM:

#include&ltiostream&gt
#include&ltpthread.h&gt
using namespace std;
void *Thread()
{
cout&lt&lt"HELLO";
}
int main(){
pthread_t t_id;

pthread_create(&t_id,0,&Thread,0);
pthread_join(t_id,NULL);

return 0;
}

Comments

Popular posts from this blog

Introduction to ChatGPT: Explain what ChatGPT is, how it works, and what it is used for.

Multi Level Inheritance In cpp

Hybrid Inheritance In cpp