| | |
Conveting file into binary mode
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Mar 2008
Posts: 8
Reputation:
Solved Threads: 0
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.
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.
Last edited by man4ish; Mar 31st, 2009 at 5:56 am. Reason: wrong title :
•
•
Join Date: Dec 2007
Posts: 360
Reputation:
Solved Threads: 69
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)
If you are forced to reinvent the wheel at least try to invent a better one!
Please use code tags - Please mark solved threads as solved
Please use code tags - Please mark solved threads as solved
![]() |
Other Threads in the C++ Forum
- Previous Thread: c++ 2 dimentional array- airplane seating
- Next Thread: compiler errors lnk2019, lnk1120
| Thread Tools | Search this Thread |
api array based beginner binary bitmap c++ c/c++ calculator char char* class code coding compile compiler console conversion count data database delete deploy developer dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game getline givemetehcodez graph gui homeworkhelp homeworkhelper iamthwee ifstream input int java lib linkedlist linker list loop looping loops map math matrix memory multiple news node number numbertoword output parameter pointer problem program programming project proxy python random read recursion recursive reference rpg sorting string strings temperature template test text text-file tree url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets





