帮助strerror(错误) [英] Help with strerror(errno)

查看:64
本文介绍了帮助strerror(错误)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不得不修改一些错误,或者在执行某些命令时是否会自动修改?


所以,如果我只是做了一些事情,然后打印出strerror(错误)会它知道要打印出什么错误吗?


另外 - 如果我有一个空的strerror会发生什么?它会导致错误或它的行为是什么吗?


谢谢!!

Is errno something that I have to modify, or is it automatically modified when certain commands are executed?

So if I just did something, and then printed strerror(errno) would it know what error to print out?

Also - what happens if I have an empty strerror() ? Will it cause an error or what is its behavoir?

thanks!!

推荐答案

Google是你的朋友。我输入了strerror进入谷歌和第一页提供了一个很好的功能概述,并回答你的问题。然后我输入了errno在看了第三个链接(IBM的一个)后,我再次得到了答案。


试试Google。


另外,因为我相信errno.h是一个linux头文件,我假设你使用的是linux。如果是这种情况,那么尝试去终端并输入man strerror。这应该告诉你你想知道什么关于strerror。至于errno,尝试相同的事情(在这种情况下将是man errno命令)。


Edward
Google is your friend. I typed "strerror" into google and the first page provides a nice overview of the function and answers your question nively. Then I entered "errno" and after looking at the third link (the IBM one) I once again had my answer.

Try Google.

Additionally, since I believe that errno.h is a linux header file I am assuming you are using linux. If that is the case then try going to the terminal and entering "man strerror". That should tell you what you want to know about strerror. As for errno, try the same thing (that would be the "man errno" command in this case).

Edward


作为一个请注意,我有一种感觉,你没有及早得到回应的原因之一是因为使用谷歌可以很容易地回答你的问题。人们更愿意帮助那些做过研究的人。


Edward
As a side note, I have a feeling that one of the reasons that you didn''t get a response sooner is because of the incredible ease in which your questions could be answered by using google. People are more willing to help those who have done their research.

Edward



As旁注,我有一种感觉,你之前没有得到回应的原因之一是因为使用谷歌可以很容易地回答你的问题。人们更愿意帮助那些做过研究的人。


爱德华
As a side note, I have a feeling that one of the reasons that you didn''t get a response sooner is because of the incredible ease in which your questions could be answered by using google. People are more willing to help those who have done their research.

Edward



我做我的研究实际上我花了最后两个小时谷歌搜索并阅读所有相关信息。我头脑中有些问题对我来说并不清楚......而且我很遗憾没有找到答案,或者我已经发布了这条消息。


I DID do my research in fact I spent the last two hours "googling" and reading all about it. I just had some questions in my head that are not clear to me...and I obvoiusly did not find answers to them OR I WOUDN''T HAVE POSTED THIS MESSAGE.


这篇关于帮助strerror(错误)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆