Midhat Mukadam wrote:yes i know...it is not the part of threads...it is of the io streams...... i dont knw...but even after reading about seek method...i coudnt get what it is actually....... can you please explain me with a certain example or something
No need for an example, the concept is pretty easy. Basically, the way to locate data on a file is via an index. The beginning of the file is location zero. Ten bytes in is location ten. Two kilobytes from the beginning is 2 times 1K, or 2 times 1024 bytes, or location 2048. Etc. Etc. Etc.
When you first open a file, it is at location zero, and as you read the file, the location index increments. However, what if you don't want to read from the beginning? What if you want to move around the file? To do that you seek to the particular location via the seek() method.
And next time, please be more careful. If you know that it is not threads related, please don't put it in the threads forum -- please put it in the correct forum.
Henry