and how to go from a seq. txt file to a relative file in c++
and how to go from a seq. txt file to a relative file in c++
Last edited by pkananen; 02-10-2002 at 01:43 PM.
I Love Jesus
here's my definitions, but they may not be the same as yours.
A sequential file is one in which data is stored in sequence. The data could be of any type; of any length, in any sequence.
Here's an example:
123456789 happy birthday 20.012
here's another:
123 345 red 001 456 blue;
Both of the above examples are sequential. If you know the pattern you can get things out just fine. The latter file seems to have a reasonble pattern of two ints followed by a string. If you encorporated that pattern into a struct, then you could think of it as a sequence of struct. Since each struct must have the same amount of memory, then you can use random access to access any given structs contents. This latter type of file is a relative file where all data is a given multiple of memory away (relative) to any other chunk of memory. Relative files have to have memory in specific chunks, meaning same size fields for each item stored in the file. If you can find a repetitve pattern in a sequential file can convert it into a relative file.