Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果您使用 'perror(errno)',它会自动将错误打印到标准错误输出流。有没有办法在不打印的情况下获得打印的值?
您可以使用其中一种strerror功能。他们将在不打印的情况下检索错误消息。
strerror