The Daily Static
  The Daily Static
UF Archives
Register
UF Membership
Ad Free Site
Postcards
Community

Geekfinder
UFie Gear
Advertise on UF

Forum Rules
& FAQ


Username

Password


Create a New Account

 
 

Back to UserFriendly Strip Comments Index

Logging question: by MrTrick2004-12-12 18:40:02
  Do you need a library for that? by ToLazyToThink2004-12-12 19:26:40
    Okay... by MrTrick2004-12-12 19:38:52
      Personally by ToLazyToThink 2004-12-12 22:55:26
I'd just use fprintf & fscanf (or cin/cout if you want go the "pure" C++ route).

Shouldn't be to hard, a line or so for each field in you data for output, and 1-3 lines per field for reading them back in.

If you can make it so each "record" is the same number of bytes, makes you searching a bit easier. But, even if you don't it shouldn't be to bad, you just won't be able to do random access.

I'd also put begin and end markers and flush after each write. Makes it easer to figure out what happened when the s4 hits the fan.
[ Reply ]

 

[Todays Cartoon Discussion] [News Index]

Come get yer ARS (Account Registration System) Source Code here!
All images, characters, content and text are copyrighted and trademarks of J.D. Frazer except where other ownership applies. Don't do bad things, we have lawyers.
UserFriendly.Org and its operators are not liable for comments or content posted by its visitors, and will cheerfully assist the lawful authorities in hunting down script-kiddies, spammers and other net scum. And if you're really bad, we'll call your mom. (We're not kidding, we've done it before.)