One detail you can't see from the output is that perror() writes its message to the standard error channel (stderr); the printf() call in Listing 1 is writing to the standard output channel (stdout).
您无法从输出中看到的一个细节是,perror() 将其消息写入标准错误通道 (stderr);清单1中的printf()调用将写入标准输出通道 (stdout)。
One detail you can't see from the output is that perror() writes its message to the standard error channel (stderr); the printf() call in Listing 1 is writing to the standard output channel (stdout).
您无法从输出中看到的一个细节是,perror() 将其消息写入标准错误通道 (stderr);清单1中的printf()调用将写入标准输出通道 (stdout)。
应用推荐