Error reporting in C++ - Booleans (6/13)

Поділитися
Вставка
  • Опубліковано 2 жов 2024
  • Join me in these bi-weekly series to explore the topic of error reporting in C++.
    The focus of this course is the design of functions that normally return a value, but an error may occur so, what should they return instead?
    In this video we will be looking at reporting errors using booleans.
    Booleans are a built-in type that can either be true or false. This approach is simple to implement and understand, but we cannot distinguish between different errors.
    The main drawback is that we need to pass the contents of the file as an out parameter and there's nothing stopping the caller from accidentally accessing the contents of the file if an error has occured.
    The course is also available FOR FREE on Udemy.
    It includes coding exercises so you can practice what you have learned.
    Check it out and please consider leaving a review if you find it helpful: www.udemy.com/...

КОМЕНТАРІ •