Mail Archives: djgpp/2000/05/21/11:20:59
Eli Zaretskii wrote:
>
> On Sun, 21 May 2000, Alexei A. Frounze wrote:
>
> > > > How do I work with all those types? For example, if file position depends on
> > > > a string length, how do I mix those size_t and fpos_t correctly?
> > >
> > > In general, there should be no need to mix them. There should be no
> > > reason for a file position to depend on a string length.
> >
> > IMHO C/C++ is for programming. Not for figuring out why your idea/algorithm
> > is faulty, although it's clear and logical.
>
> Sorry, I don't follow. Please explain how does this comment pertain to
> the question you asked and my response.
Okay. You said "there should be no need to mix them", right? Is somewhere
stated that I can't use strlen()s, sizeof()s, etc for making file offsets,
array indexes, etc? If nowhere this stated that implies I *can*. It's a very
logical thing: add sizes/lengths of objects and you'll find offset/index.
Right? And this idea is compiler independant.
If this is correct, why I can't mix those types (size_t, fpos_t, etc)?
Or better in other words: how do I mix them correctly?
bye.
--
Alexei A. Frounze
-----------------------------------------
Homepage: http://alexfru.chat.ru
Mirror: http://members.xoom.com/alexfru
- Raw text -