hey! i m new and don't know how to read a .dat file in C++. Can anyone help me to put me out of this problem?
rehan_5 0 Newbie Poster
Recommended Answers
Jump to PostA
.dat
file could be anything. You'll need to know what the file format is. Is it plaintext? Is it binary? Compressed? Encrypted? What structure does it take? Do you have a file format reference?You can read any file using C++'s conventional file streams. The problem is interpreting what …
Jump to PostWell that is pretty easy to do. You need to calls two
>>
and one call to ignore to eat the rest of the line. The folwwing is psuedo code:column1, column2 // use ifstream for file read operations ifstream file(some data file); // since the …
All 7 Replies
Hiroshe 499 Posting Whiz in Training
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster
melissad -4 Newbie Poster
NathanOliver 429 Veteran Poster Featured Poster
rehan_5 0 Newbie Poster
NathanOliver 429 Veteran Poster Featured Poster
rehan_5 commented: Thanks Alot.. +0
sanjulovers -3 Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.