#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
void *fork_thread(void *ptr );
main()
{
pthread_t thread1;
char *message1 = "Thread 1";
int iret1;
iret1 = pthread_create( &thread1, NULL, fork_thread, (void*) message1);
exit(0);
}
Void *fork_thread( void *ptr )
{
int x=10;
char *message;
message = (char *) ptr;
printf("%s \n", message);
printf(" is %d",x);
}
i am a begginer ,so please don't take it as useless
please find the error in this thread creation