I know that C++ is basically 100% backwards compatible with C as long as the correct libraries are linked but I was wondering if it would worth my while to use C++ for multi-threading instead of C.
The reason I ask is because I have a class where we need to write multi-threaded apps and the book we have is in C and the Prof. is not familiar with C++ but said that if we can make it work in C++ than that's fine.
Would it be advantageous to try and multi-thread in C++ or would it be just as easy in C?
What libraries are you going to use..? Some are quite straight forward to implement, like openMP, pthread, some are NOT. Easy meaning, you don't have to thinker with the code to get it paralleled.
You can abstract the use of C++ behind a C API. I do it all the time with void pointers (which people don't seem to like...).
However, there's no real reason to use C++ aside from using the extra functionality a certain C++ library provides. I don't know of a cross-platform C thread library to be honest although one is very possible.
glib might provide one as it provides just about everything. Although, I've seen some *very* questionable implementations in glib so use at your own risk.