W
Wolfgang Thomsen
Hello,
I need to process very large files which are made of blocks of data. To
speed up the reading of a specific block, I let my program note down the
streampos of each block's beginning in a file, which seems to work.
For reading the stream positions back, I use the following code:
while(!indexfile.eof()) {
int position;
indexfile >> position;
//.. save position into a vector ..
}
which does not work because the numerical streampositions exceed the size of
an int.
while(!indexfile.eof()) {
streampos position;
indexfile >> position;
//.. save position into a vector ..
}
does not work either and gives me an error message
"error: ambiguous overload for operator>> in
((XYZFile*)this)->XYZFile::indexfile >> position"
(XYZFile is the name of the class).
It also gives me a long list of possible candidates, but I do not know how
to specify which it should use, let alone decide which one I should use.
Any help or suggestions are greatly appreciated,
regards, Wolfgang
I need to process very large files which are made of blocks of data. To
speed up the reading of a specific block, I let my program note down the
streampos of each block's beginning in a file, which seems to work.
For reading the stream positions back, I use the following code:
while(!indexfile.eof()) {
int position;
indexfile >> position;
//.. save position into a vector ..
}
which does not work because the numerical streampositions exceed the size of
an int.
while(!indexfile.eof()) {
streampos position;
indexfile >> position;
//.. save position into a vector ..
}
does not work either and gives me an error message
"error: ambiguous overload for operator>> in
((XYZFile*)this)->XYZFile::indexfile >> position"
(XYZFile is the name of the class).
It also gives me a long list of possible candidates, but I do not know how
to specify which it should use, let alone decide which one I should use.
Any help or suggestions are greatly appreciated,
regards, Wolfgang