title: How to collect and store tellp(), tellg() return types?
body: <p>I am writing a program that maintains a linked_list in a file. So I traverse across the file, by using tellp()/tellg() and adding it to a particular long integer(can be seen as an offset) to get to the new location.</p>
  
  <p>An simple example would be</p>
  
  <pre><code>   long next_offset =  sizeof(long) + sizeof(int) .... 
     //like size of all the elements in the record, etc
  
     curr_node = out.seekg();
     while(curr_node != -1) {
            out.read(...);
            **curr_node.seekg(curr_node.tellp() + next_offset);**
            out.read((char *)&amp;curr_node,sizeof(long));
     }
  </code></pre>
  
  <p>so here basically I am saving tellp() value as long and dng an long addition, is this fine?? or is there a chance that I might lose some bits when the pos_value gets big???</p>