hello everyone
is it legal to declare a pthread_t variable inside a function of a class,
and then execute with it another function of a class?
i mean what comes to mind is that local variables die with the end of a function execution. but then pthreads are independent of that?
so should i move the declaration of the variabled and make it a class variable or no need?
obviously this is my first attempt in thread... so please bare with me.
also you need to add -pthread in the g++ when compiling right?
and only on the compilation of the specific class.. or in main too? or in all the classes that include/are included by this class ?
i wonder...
nass
Bookmarks