gpt4 book ai didi

c++ - #在 C 中包含 iostream?

转载 作者:IT王子 更新时间:2023-10-28 23:28:04 25 4
gpt4 key购买 nike

在 C++ 中,我们总是将以下内容放在程序的顶部

#include <iostream>

C 呢?

最佳答案

嗯,这称为标准 I/O header 。在 C 中你有:

#include <stdio.h>

它不是 <iostream> 的类比. C 中没有类似 iostream 的东西——它缺少对象和类型。如果您使用 C++,它类似于 <cstdio> .

另请参阅这个奇妙的问题及其答案,

关于c++ - #在 C 中包含 iostream?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1844223/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com