Last active
February 6, 2024 09:44
-
-
Save Offirmo/e762f388da448bb71eb0ed5d023c824e to your computer and use it in GitHub Desktop.
[C++ libs usage]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// all libs | |
// https://en.cppreference.com/w/cpp/header | |
//////////// | |
#include <iostream> | |
std::cout << "Hello, world!" << std::endl; | |
//////////// | |
// https://en.cppreference.com/w/cpp/error/assert | |
// uncomment to disable assert() | |
// #define NDEBUG | |
#include <cassert> | |
assert(1 == 2); | |
//////////// | |
// https://en.cppreference.com/w/cpp/utility/program/abort | |
#include <cstdlib> | |
// normal termination | |
std::exit(EXIT_SUCCESS) | |
std::exit(EXIT_FAILURE) | |
// abnormal termination without cleanup | |
std::abort(); | |
//////////// | |
// https://en.cppreference.com/w/cpp/error/errc | |
<system_error> | |
std::error_code error_code | |
if (error_code == std::errc::invalid_argument)... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment