seekg() and seekp() do not write.
Something else is wrong. Do you have a code sample?
it is a long class that deals with extenedhash files. data and bat. this is the function where i use seekg. after the seekg line i get a long line in my file until the seekg position.
void Extendhash::readBlock(block &dest, fstream &input, int block)
{
if(!input.is_open())
throw "readBlock(): Input file closed!";
// variables to hold the input data (identical to the variables in the block class)
char blockNumber[5] = {""};
char recordCount[3] = {""};
char blockType[2] = {""}; // "D": data, "B": b-a-t
char depth[5] = {""};
char nextBlock[5] = {""};
char empty[4] = {""};
char data[1000] = {""};
// move the read pointer to the desired block and read its data
input.seekg(block * BlockSize);
int temp = input.tellg();
input.read(blockNumber, 4);
input.read(recordCount, 2);
input.read(blockType, 1);
input.read(depth, 4);
input.read(nextBlock, 4);
input.read(empty, 3);
input.read(data, 999);
dest.setNumOfBlock(blockNumber);
dest.setBlockType(blockType);
dest.setDepth(depth);
dest.setRecordBlockCount(recordCount);
dest.setNextBlock(nextBlock);
dest.setData(data);
}