问题
I am trying to figure out what boost system error code 2 is. Within a program they print out the boost error code. However, I am not sure how to look up this error code.
Any help would be apprecaited.
回答1:
Off the top of my head: ENOENT/FileNotFound
See the errorcodes in http://www.boost.org/doc/libs/1_58_0/libs/system/doc/reference.html#Header-error_code
Live On Coliru
#include <boost/system/error_code.hpp>
#include <iostream>
int main()
{
boost::system::error_code ec;
ec.assign(2, boost::system::system_category());
std::cout << ec.message() << "\n";
ec.assign(boost::system::errc::no_such_file_or_directory, boost::system::system_category());
std::cout << ec.message() << "\n";
}
Prints
No such file or directory
No such file or directory
回答2:
For windows it is ERROR_FILE_NOT_FOUND
Check the reference
来源:https://stackoverflow.com/questions/29782429/what-is-boost-system-error-code-number-2