Klaus Schmidinger wrote: > This would allow anybody to do > > cThread t; > StartThread(&t); > > which I don't think would be a good thing to do. > > Any ideas how to prevent this from happening? It's perfectly okay to declare StartThread extern "C" static void *StartThread(cThread *Thread); within thread.c so it isn't visible outside the object thread.o. Such an invalid use would be caught by the (dynamic, in case of plugins) linker. With gcc 4.0 fulfilling the current standard the friend declaration isn't even a valid implicit forward declaration anymore, so a misuse of StartThread would even result in a compile time error then. Greetings, Sascha Volkenandt