#include#include int main() { boost::system::error_code ec = boost::system::errc::no_such_file_or_directory; std::cout << ec.message() << std::endl; return 0; }
#includeIn this example, we create an error code "ec" representing the "no_such_file_or_directory" error, and then we convert it to a string using the "message" method of the error_code class. The Boost.System library is included as part of the Boost C++ libraries package.#include int main() { boost::system::error_code ec = boost::system::errc::no_such_file_or_directory; std::string ec_str = ec.message(); return 0; }