Video Coming Soon...
53: Exception Alternatives
This exercise is pending. Quick notes about this exercise:
Talk about the possible problems with exceptions using a demo
Show how to not use them
std::optional, std::expected
Talk about nodiscard as a hack for error handling.
The Code
See how I did it.
View Source file ex53.cpp Only#include <fmt/core.h>
#include <chrono>
#include <thread>
#include <string>
int main(int argc, char* argv[]) {
fmt::println("HELLO!");
}
The Breakdown
line of code- Description.
The Discussion
Blah blah.
Further Study
- Do this next.
Register for Learn C++ the Hard Way
Register to gain access to additional videos which demonstrate each exercise. Videos are priced to cover the cost of hosting.