File I/o

This is a discussion on File I/o within the C++ Programming forums, part of the General Programming Boards category; peoples, i need help with file i/o, what i need is to be able to store data and retrieve it ...

  1. #1
    Registered User
    Join Date
    Sep 2005
    Posts
    142

    File I/o

    peoples, i need help with file i/o, what i need is to be able to store data and retrieve it when i want, my project is a simple database, now, i have ben playing with file i/o for a little while now and i am still a noob but i'm still having trouble storing the data and then being able to retrieve it once i have stored it, should i be using text files or is there something else? i know this is probably a broud question but the tutorials don't go any further and i don't know what to do, can you help?
    WhAtHA hell Is GoInG ON

  2. #2
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    There's also binary files.


    Think about the data you want to store and retrieve. Think about all the operations you want to perform on this data. Then think about a suitable disk format for it.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  3. #3
    Registered User
    Join Date
    Sep 2005
    Posts
    142
    Quote Originally Posted by CornedBee
    There's also binary files.


    Think about the data you want to store and retrieve. Think about all the operations you want to perform on this data. Then think about a suitable disk format for it.
    would it be better using binary files for this or would you recommand using text files?
    WhAtHA hell Is GoInG ON

  4. #4
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    What is this? You haven't told us anything except that it is "a simple database", which says absolutely nothing.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  5. #5
    Registered User
    Join Date
    Sep 2005
    Posts
    142
    Quote Originally Posted by CornedBee
    What is this? You haven't told us anything except that it is "a simple database", which says absolutely nothing.
    what eva, no need to be an .............., i'm still very new to this, Man all i want is some help
    WhAtHA hell Is GoInG ON

  6. #6
    Registered User
    Join Date
    Sep 2005
    Posts
    142
    Don't worry about it man i'll figure it out my self FFS....................
    WhAtHA hell Is GoInG ON

  7. #7
    Its hard... But im here swgh's Avatar
    Join Date
    Apr 2005
    Location
    England
    Posts
    1,475
    Can or do you understand how the fstream header functions work? Read up on it, check out online help also.
    Give us an example of what you have done so far if you can.
    I'm just trying to be a better person - My Name Is Earl

  8. #8
    Registered User
    Join Date
    Jan 2005
    Posts
    7,317
    >> what eva, no need to be an .............., i'm still very new to this, Man all i want is some help
    Re-read that post again, this time assuming that CornedBee was being helpful and not being mean. Sometimes it is difficult to identify a person's tone over the internet, so it might be better if you always assumed a person has a positive tone instead of a negative one.

  9. #9
    MFC killed my cat! manutd's Avatar
    Join Date
    Sep 2006
    Location
    Boston, Massachusetts
    Posts
    870
    a.k.a., we need more information.
    Silence is better than unmeaning words.
    - Pythagoras
    My blog

  10. #10
    Registered User
    Join Date
    Sep 2005
    Posts
    142
    Quote Originally Posted by Daved
    >> what eva, no need to be an .............., i'm still very new to this, Man all i want is some help
    Re-read that post again, this time assuming that CornedBee was being helpful and not being mean. Sometimes it is difficult to identify a person's tone over the internet, so it might be better if you always assumed a person has a positive tone instead of a negative one.
    Ok, i imagined me saying it with a smile on my face, Sorry didn't work, i understand what you are saying tho, i understand i didn't give enough information but he didn't come straight out and say that!
    WhAtHA hell Is GoInG ON

  11. #11
    Registered User
    Join Date
    Sep 2005
    Posts
    142
    now that i have had a look at it the question is way to difficult to answer without more information, i could be talking about anything involved with file i/o.

    i am familliar with fstream functions but havn't mastered them yet, what i need is a good reference to these function, if you could just help me with that i should be able to help myself.
    WhAtHA hell Is GoInG ON

  12. #12
    In the Land of Diddly-Doo g4j31a5's Avatar
    Join Date
    Jul 2006
    Posts
    476

  13. #13
    Its hard... But im here swgh's Avatar
    Join Date
    Apr 2005
    Location
    England
    Posts
    1,475
    I also getting a decent book that teaches more advanced C++ try
    Acellerated C++. Many other books do not concentrate too much on file io when reading and writing to files is a programs main goal
    I'm just trying to be a better person - My Name Is Earl

  14. #14
    Registered User
    Join Date
    Sep 2005
    Posts
    142
    Quote Originally Posted by swgh
    I also getting a decent book that teaches more advanced C++ try
    Acellerated C++. Many other books do not concentrate too much on file io when reading and writing to files is a programs main goal
    wikd thanks mate! england are doing better in the second test ay
    WhAtHA hell Is GoInG ON

  15. #15
    Its hard... But im here swgh's Avatar
    Join Date
    Apr 2005
    Location
    England
    Posts
    1,475
    Im not really into cricket but glad they are pulling it back, more of a footie person
    I'm just trying to be a better person - My Name Is Earl

Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Data Structure Eror
    By prominababy in forum C Programming
    Replies: 3
    Last Post: 01-06-2009, 08:35 AM
  2. Game Pointer Trouble?
    By Drahcir in forum C Programming
    Replies: 8
    Last Post: 02-04-2006, 01:53 AM
  3. 2 questions surrounding an I/O file
    By Guti14 in forum C Programming
    Replies: 2
    Last Post: 08-30-2004, 11:21 PM
  4. File I/O problems!!! Help!!!
    By Unregistered in forum C Programming
    Replies: 4
    Last Post: 05-17-2002, 08:09 PM
  5. advice on file i/o
    By Unregistered in forum C Programming
    Replies: 1
    Last Post: 11-29-2001, 04:56 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21