help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: streampos is not a long?


From: Paul Pluzhnikov
Subject: Re: streampos is not a long?
Date: Thu, 22 Jun 2006 15:17:31 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Jumbo Shrimp, linux)

"Spectre" <carlsagan.13@gmail.com> writes:

> I'm moving a Sun Forte C/C++ application to GNU GCC 3.4.1. This
> application declares "streampos pos; ... pos++;" The error with GCC is
> "no 'operator++(int)' declared for postfix '++'" and when I dig
> streampos is some kind of class, not a long integer, 

>From http://www.cplusplus.com/ref/iostream/streampos.html:

  This type describes a class to contain all the information needed
  to restore an arbitrary file-position indicator within a stream. It
  can be constructed from or casted to an integer offset value

> which stops me cold!

It doesn't need to. You can replace 'pos++;' with 'pos += 1;'

Cheers,
-- 
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]