I have one file with the following tab separated records with four columns.Now I am trying to convert the file into fixed length binary file. How it is possible. in C++.
rs149915 29103059 A/G +
rs149932 29116347 C/G -
rs149933 29123223 C/G -
rs149934 29084753 C/T -
rs150082 29117038 A/C -
rs150083 29123057 A/T -
rs150084 29122512 C/T -
rs150085 29120374 G/T -
rs150086 29128450 C/T -
rs150087 29142365 A/G -
rs150088 29135120 C/T -
rs150089 29131901 A/G -
File should be converted into binary so that it can be used with seekg and seekp pointers in C++ for retrieving records.
Thanks in advance.

9 Years
Discussion Span
Last Post by Danny_501

I don't see any problem here. This file already has fixed size records!! Additionally each line is delimited by a CR/LF pair. So the record size evaluates to 25 (if I counted correctly)


I don't think you can convert the actual file into a binary file, but you can input the data then output it into another binary file.

are you able to input the data and store them into a record?
Can you post some code of what you have already done so we know what your struggling with?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.