jjzjj

libboost_iostreams

全部标签

C++ 生成器 : #include <iostream> error

我正在测试新版本的CBuilder(XE2版)。大多数commnoninclude被重定向到boost库或dinkumware库(一些STL实现?)。#ifndefError_H#defineError_H#include#include//Errormessage,seebellow,please但编译因以下(和奇怪的)消息而停止:[BCC32Error]xlocale(1392):E2451Undefinedsymbol'MB_LEN_MAX'[BCC32Error]xlocale(1763):[BCC32Error]xlocnum(1495):E2451Undefinedsymb

c++ - std::fstream 和 Boost Iostreams 库之间的区别

我是BOOST库的新手。今天看到一小段代码,其中读写PGM格式图片是用BoostIostreamsLibrary实现的。随着我对STL越来越熟悉,我可以很容易地看出std::fstream可以完成同样的工作。那么我的问题是,在这样一个简单的读写PGM图像的应用程序中使用Boost库有什么意义呢?此外,我想知道在什么情况下最需要BOOSTIostreams库。谢谢! 最佳答案 来自std::fstreamreference:fstreamprovidesaninterfacetoreadandwritedatafromfilesasi

c++ - Boost 无法打开文件, 'libboost_filesystem-vc100-mt-gd-1_47.lib'

我已经用谷歌搜索了几个小时的错误,但没有得到太多信息。我已将该项目链接到我的VisualStudios(2010年和2012年)项目中,因为这似乎已经解决了与此类似的其他所有人的问题。但是,我仍然无法从boost的网站上获取我的示例代码并继续出现该错误。文件libboost_filesystem-vc100-mt-gd-1_47.lib在我的C:\ProgramFiles(x86)\boost\boost_1_47\lib路径中。这是我正在尝试测试并启动和运行的代码。#include#includeusingnamespaceboost::filesystem;intmain(inta

c++ - Boost iostreams 库存在,但我无法链接它

我知道有很多类似的问题,但我的问题有点不同,而且没有帮助我。我正在使用boost-iostreams库,这是我的问题,我试图将我的程序与库链接:ld-I/usr/include/boost/iostreams/-I/usr/include/boost/iostreams/device/-L/usr/lib/libboost_iostreams.so-lboost-iostreamsfd.o-ox结果是:ld:cannotfind-lboost-iostreams当我试图明确地写它时:ld-I/usr/include/boost/iostreams/-I/usr/include/boos

c++ - 如何强制 xcode 使用正确的 iostream header C++

xcode4.2osx10.7当我将我的包含设置为如下所示时:#include#include我从位于/opt/local/include/boost/tr1/tr1的文件中得到以下错误LexicalorPreprocessorIssue'boost/tr1/detail/config_all.hpp'filenotfound/opt/local/include/boost/tr1/tr1/iostream文件的内容://(C)CopyrightJohnMaddock2005.//Use,modificationanddistributionaresubjecttothe//Boost

c++ - 如何将 boost::iostreams::mapped_file_source 与 gzip 压缩的输入文件一起使用

我正在使用boost::iostreams::mapped_file_source将文本文件从特定位置读取到特定位置并操作每一行(使用g++-Wall-O3-lboost_iostreams-otestmain.cpp编译):#include#include#includeintmain(){boost::iostreams::mapped_file_sourcef_read;f_read.open("in.txt");longlongintalignment_offset(0);//setthestartpointconstchar*pt_current(f_read.data()+

c++ - 来自 file_descriptor_source (boost::iostreams) 或文件的 istream

我需要为程序的输入做这样的事情:streaminput;if(decompressed)input.open(filepath);else{file_descriptor=_popen("decompressor"+filepath,"r");input.open(file_descriptor);}input.read(...)...我可以看到一种解决方案-在这两种情况下都使用_popen,如果文件已经解压,则将文件复制到标准输出,但这看起来不是很优雅。有趣的是,与C相比这有多么困难-我猜标准库错过了它。现在我迷失在神秘的boost::iostreams文档中。如果有人知道如何操作,

C++ iostreams问题

我现在正在研究boost::iostreams我正在寻找一种方法来创建一个迭代某些container的流.现在我有适用于std::vector的代码,但它仅为它做,因为我写了std::vector-特定代码。我正在做以下事情:templatevoidLoad(Object&object,constContainer&container){usingnamespaceboost::iostreams;//Createastreamthatiteratesovervectoranduseitin//thefollowingprocedureLoadImpl(object,stream(&c

c++ - 对 `boost::iostreams::mapped_file_source::mapped_file_source()' 的 undefined reference

我正在测试boost的内存映射文件,但是一旦我声明了一个boost::iostreams::mapped_file,就像在这个程序中一样:#include//definesff_pipelineandff_Pipe#include#include#include#include#include#include#include#include"MapReduceJob.hpp"usingnamespaceff;intmain(intargc,char*argv[]){boost::iostreams::mapped_filemf;}使用这个makefile:#FastflowandBoo

c++ - 使用 boost iostreams 读取和写入数组到压缩文件

我想将一个数组写入一个文件,边写边压缩它。稍后,我想从该文件中读取数组,边解压边解压。Boost的Iostream似乎是一个不错的选择,所以我构建了以下代码。不幸的是,输出和输入数据最后比较不相等。但他们几乎做到了:OutputInput0.84018772840.84018802640.39438292380.39438301320.78309923410.78309899570.79844003920.79843997960.91164737940.91164702180.19755136970.19755099710.33522275090.3352229893这表明每个floa