什么是升压系统error_code number 2 [英] What is boost system error_code number 2
本文介绍了什么是升压系统error_code number 2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图找出什么是Boost系统错误代码2.在程序内,他们打印出提升错误代码.但是,我不确定如何查找此错误代码.
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.
将提供任何帮助.
推荐答案
离我远去:ENOENT/FileNotFound
Off the top of my head: ENOENT/FileNotFound
请参见 http:中的错误代码://www.boost.org/doc/libs/1_58_0/libs/system/doc/reference.html#Header-error_code
#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";
}
打印
No such file or directory
No such file or directory
这篇关于什么是升压系统error_code number 2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文