Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C++
Memory errors HELP!
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="int2str, post: 2544039"] Still unrecoverable code :D. Using Daniels suggestions and your update on the format, here is a nicer version: #include <iostream> #include <string> #include <fstream> #include <sstream> #include <map> using namespace std; int main() { ifstream ff( "test.dat" ); string document, edition, rest; map<string,string> documents; while( getline( ff, document, ',' ) && getline( ff, edition, ',' ) && getline( ff, rest )) { cout << document << " " << edition << endl; documents.insert(make_pair(document, edition )); } } [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C++
Memory errors HELP!
Top