C++ iostream
时间: 2023-11-14 21:06:23 浏览: 79
C++中的<iostream>是一个头文件,定义了标准输入/输出流对象。它包含了<iostream>之外,还自动包含了<ios>、<streambuf>、<istream>、<ostream>和<iosfwd>这些头文件。而cout是一个ostream类(iostream的派生类)的对象,可以理解为一种输出流对象。它实际上是在iostream中预定义的一个变量。至于C语言中的源文件名扩展名常用的有.cpp、.cxx、.cc、.c,而头文件的扩展名常用的有.hpp、.hxx、.h。所以可以看出,C++是C的超集,完全兼容C的语法特性和标准库,C++编译器完全可以正常编译C程序。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [C++中头文件iostream介绍](https://blog.csdn.net/fengbingchun/article/details/63685373)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [c++标准库iostream](https://blog.csdn.net/m0_60073820/article/details/121319269)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文