Jump to content
  • Advertisement
Sign in to follow this  
WazzatMan

C++ Book Covering Exceptions and Events

This topic is 3667 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Does anyone know a book which covers the C++ variants of exception handling and events (Maybe Delegates?), the one I have doesn't even mention them. I'm pretty sure exception handling exists at least, the keywords 'try' and 'catch' are bolded in dev c++.

Share this post


Link to post
Share on other sites
Advertisement
Thinking in C++ has a large chapter on exception handling and is freely available.

Delegates and events are not language features of C++. Maybe you're thinking about C# or C++/CLI?

Share this post


Link to post
Share on other sites
C++ doesn't have events or delegates at language level. Functionality can be built using (member) function pointers or observer pattern. Boost provides ubiquitous mechanism for all these in combination with bind and signal libraries. There are other libraries and frameworks which offer similar functionality.

Generic delegate functionality similar to C++ is complex in C++ due to memory managed issues (which requires cooperation from handlers as well as containers, or at least careful use of all participants). I'm not aware of any comprehensive source which would cover all, but I've found documentation of related libraries to touch most topics.


Exception handling in C++ is surprisingly complex and depends to a degree on OS/compiler (MVC especially has additional functionality). They are fairly unpopular topic for historic reasons, and a portion of C++ developers excludes them from the feature set they use.

From pure language perspective, the most important concept is exception safety and requires pre-requisite understanding of other concepts. Effective C++ by Scott Meyers covers those topics fairly well.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!