Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying C++ Programming for Linux Systems
  • Table Of Contents Toc
C++ Programming for Linux Systems

C++ Programming for Linux Systems

By : Desislav Andreev, Stanimir Lukanov
4.6 (5)
close
close
C++ Programming for Linux Systems

C++ Programming for Linux Systems

4.6 (5)
By: Desislav Andreev, Stanimir Lukanov

Overview of this book

Around 35 million Linux and almost 2 billion Android users rely on C++ for everything from the simplest embedded and IoT devices to cloud services, supercomputing, and space exploration. To help you produce high-quality software, two industry experts have transformed their knowledge and experience into practical examples in system programming with C++ Programming for Linux Systems. In this book, you'll explore the latest C++20 features, while working on multiple specific use cases. You’ll get familiar with the coroutines and modern approaches in concurrent and multithreaded programming. You'll also learn to reshape your thinking when analyzing system behavior in Linux (POSIX) environments. Additionally, you'll discover advanced discussions and novel solutions for complex challenges, while approaching trivial system operations with a new outlook and learning to choose the best design for your particular case. You can use this workbook as an introduction to system programming and software design in Linux or any Unix-based environment. You’ll also find it useful as a guideline or a supplement to any C++ book. By the end of this book, you’ll have gained advanced knowledge and skills for working with Linux or any Unix-based environment.
Table of Contents (15 chapters)
close
close
Lock Free Chapter
1
Part 1:Securing the Fundamentals
7
Part 2:Advanced Techniques for System Programming

Handling Errors with C++

This chapter will focus on error handling in C++. As a programmer, you will inevitably encounter situations where you need to determine the best approach to propagate program errors. Whether you use error codes or exceptions, we will delve into them to gain a better understanding of how to use them effectively.

In this chapter, we will examine how to handle errors reported by POSIX APIs using C++. We will begin by covering the errno thread-local variable and the strerror function. After that, we will introduce std::error_code and std::error_condition and demonstrate how they help to wrap POSIX errors that come from POSIX APIs. We will also investigate custom error categories, which allow us to compare errors produced by various sources and develop platform-independent error-handling code.

As we progress, we will learn about exceptions in C++ and how to convert std::error_code into a std::system_error exception. We will also explore some best practices...

Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
C++ Programming for Linux Systems
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist download Download options font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon