From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24807 invoked by alias); 8 Mar 2007 20:10:48 -0000 Received: (qmail 24703 invoked by uid 22791); 8 Mar 2007 20:10:47 -0000 X-Spam-Check-By: sourceware.org Received: from exprod6og55.obsmtp.com (HELO exprod6og55.obsmtp.com) (64.18.1.191) by sourceware.org (qpsmtpd/0.31) with SMTP; Thu, 08 Mar 2007 20:10:35 +0000 Received: from source ([192.150.11.134]) by exprod6ob55.postini.com ([64.18.5.12]) with SMTP; Thu, 08 Mar 2007 12:10:03 PST Received: from inner-relay-1.corp.adobe.com ([153.32.1.51]) by outbound-smtp-1.corp.adobe.com (8.12.10/8.12.10) with ESMTP id l28K9lD1001221; Thu, 8 Mar 2007 12:09:47 -0800 (PST) Received: from fe1.corp.adobe.com (fe1.corp.adobe.com [10.8.192.70]) by inner-relay-1.corp.adobe.com (8.12.10/8.12.10) with ESMTP id l28KA2I9024453; Thu, 8 Mar 2007 12:10:02 -0800 (PST) Received: from namailgen.corp.adobe.com ([10.8.192.91]) by fe1.corp.adobe.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 8 Mar 2007 12:10:01 -0800 Received: from 10.32.16.88 ([10.32.16.88]) by namailgen.corp.adobe.com ([10.8.192.91]) via Exchange Front-End Server namailhost.corp.adobe.com ([10.8.192.70]) with Microsoft Exchange Server HTTP-DAV ; Thu, 8 Mar 2007 20:10:01 +0000 User-Agent: Microsoft-Entourage/11.3.3.061214 Date: Thu, 08 Mar 2007 20:48:00 -0000 Subject: Re: Strange Behavior From: John Love-Jensen To: Eric Lemings , MSX to GCC Message-ID: In-Reply-To: Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2007-03/txt/msg00116.txt.bz2 Hi Eric, The istream_iterator uses >> operator. You have the std::ios_base::skipws flag set in your ifstream named 'in' (since the ios_base::skipws is set by default, and you haven't cleared it). Add a line to your main() to clear the skipws flag: ifstream in ("logo.gif", ios_base::binary);: in.unsetf(ios_base::skipws); // <-- Add this line. The results still differ between your C++ and your C version. I'm not sure if the bug in your C++ or C version, though. HTH, --Eljay