简体   繁体   English

为了使用std :: streamoff和std :: streamsize包括哪个标头?

[英]Which header to include in order to use std::streamoff and std::streamsize?

I want to use the std::streamoff and std::streamsize types without pulling a huge part of the iostream library. 我想使用std::streamoffstd::streamsize类型,而不会std::streamsize iostream库的很大一部分。 For now, I'm including the <iostream> header. 现在,我包括<iostream>标头。 Is there a better way to proceed ? 有更好的方法进行吗?

它们在头文件<ios>中定义

#include <ios>应该足够了。

供将来参考,尽管该网站并不完美, 但是如果您想知道某物所在的确切标头,则cplusplus.com就足够了。它位于尖括号之间的右上角,在本例中为<ios>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 std::streampos、std::streamoff 和 std::streamsize 到 long long int? - std::streampos, std::streamoff and std::streamsize to long long int? 声明一个大小为std :: streamoff的数组 - Declaring an array with size std::streamoff 的std :: cin.ignore(的std :: numeric_limits <std::streamsize> 使用#include时出现:: max(),&#39;\\ n&#39;)错误 <Windows.h> - std::cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n') error when using #include <Windows.h> 在header或cpp中包含std库? - Include std library in header or cpp? 如何包含<numbers>头文件并使用 std::numbers - How to include <numbers> header file and use std::numbers 无法在wxWidgets应用程序中包含std :: thread标头 - Cannot include std::thread header in wxWidgets application 首选包含std :: size_t的标头 - preferred include header for std::size_t 为什么std :: streamsize被定义为signed而不是unsigned? - Why is std::streamsize defined as signed rather than unsigned? streamsize,streamoff和其他与流相关的数据类型的实际类型是什么 - what is the actual type of streamsize,streamoff and other stream related data type 在 C++ 中,最大 std::streamsize 总是等于 std::string max_size()? - In C++ maximum std::streamsize is always equals to std::string max_size()?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM