Overview
Features
Download
Documentation
Community
Add-Ons & Services

Sample code bug in InflatingInputStream document

A general discussion forum.

Sample code bug in InflatingInputStream document

Postby setsu » 23 Apr 2009, 22:44

There's following sample code in InflatingInputStream document:

Code: Select all
std::ifstream istr("data.gz", std::ios::binary);
InflatingInputStream inflater(istr, InflatingStreamBuf::STREAM_GZIP);
std::string data;
istr >> data;


But final line should be replaced as follows:
Code: Select all
inflater >> data;
setsu
 
Posts: 11
Joined: 12 Jan 2008, 11:29
Location: Japan

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 2 guests

cron