Thread Programming in CPP

Simple Thread Programming in CPP

PROGRAM:

  1. #include&ltiostream&gt
  2. #include&ltpthread.h&gt
  3. using namespace std;
  4. void *Thread()
  5. {
  6. cout&lt&lt"HELLO";
  7. }
  8. int main(){
  9. pthread_t t_id;
  10.  
  11. pthread_create(&t_id,0,&Thread,0);
  12. pthread_join(t_id,NULL);
  13.  
  14. return 0;
  15. }
  16.  

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