What's the best C++ reference?

Started by
5 comments, last by nobodynews 14 years, 10 months ago
Hi guys, I'm trying to learn C++, and I'm really missing the Java API right now... Is there anything similar available for C++ ? (I'm trying to look into threading right now, and can't even find out how to use a sleep() command, or what header is needed.) Any help would be appreciated :)
Advertisement
I like this.

That seems pretty good for the STL.

But what about threading stuff?
Quote:Original post by meteorstorm42

But what about threading stuff?


C++ doesn't have threads. You need to use OS API for that.

The closest to standard interface is the boost::thread library, which is basis of what concurrency support will look like in next C++ standard. pthreads is another library (POSIX), but more C-centric.

If you miss Java, look into Qt. Containers look like those of .Net or Java, it has UI, and just about everything else.

Quote:That seems pretty good for the STL.


This is also all there is. The entire C++ standard library. Everything else needs to be provided by third-party libraries, wrapping OS/platform-specific functionality.
C++ doesn't have any.

You'd want to use the reference for the third-party library you're using for threading (for example, MSDN if you're directly using the threads provided by the Win32 API, Boost's documentation if you're using their threading abstraction, et cetera).

Any idea how more recent games handle multithreading?
Is it through the OS? Or do they go through an API?
(I know SDL offers threading for example.)
Different games will use different libraries for different reasons. What you should be doing is stating your requirements and asking what library or libraries meet those requirements if any. I'll get you started with some questions: What OS(es) are you targeting? What compiler(s) will you be using? What existing library or libraries are you using?

C++: A Dialog | C++0x Features: Part1 (lambdas, auto, static_assert) , Part 2 (rvalue references) , Part 3 (decltype) | Write Games | Fix Your Timestep!

This topic is closed to new replies.

Advertisement