Thread: help with a text database

  1. #1
    Registered User
    Join Date
    Jan 2006

    Exclamation help with a text database

    hello. im a computer programming student at my high school and im using ideas for a final project, but its something we havent done. the reason i want to do it is to have an example in my essay and proof why i want to take the schools Advanced Computer Progamming course. what i'm trying to do is take about, for example, 4-5 students and organize a program that will produce something like the following. the only thing im wondering if anyone can help me is how to add, delete, and so on from a text file. i've looked online and books and i dont really understand it much.

    1. Enroll
    2. Withdrawl
    3. Search
    4. List
    0. QUIT
    Option: 1
        Name: John Smith
        ID number: 10001
        Address: 123 E 9th St
        Grade: 11
        Phone: 212-555-1234
            STUDENT ADDED
    1. Enroll
    2. Withdrawl
    3. Search
    4. List
    0. QUIT
    Option: 3
        1. By last name
        2. By ID number
        Option: 2
            Enter ID: 10001
                ID#     Name          Address         Phone           GR   HR
                10001   John Smith    123 E 9th St    212-555-1234    11   2990
    does anyone have any ideas where i can understand how to do this or anyone that can help me? and help would be greatly appreciated. im sure this is very hard to do but im willing to teach myself lol.

  2. #2
    Slave MadCow257's Avatar
    Join Date
    Jan 2005
    Luckily that is not very hard, are you familiar with fstream?

    When loading in the database, I might suggest defining a struct (or class) called student, and storing a list of these in an STL vector.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Creating a database
    By Shamino in forum Game Programming
    Replies: 19
    Last Post: 06-10-2007, 01:09 PM
  2. Text File database
    By krageon in forum C++ Programming
    Replies: 31
    Last Post: 02-14-2006, 03:57 PM
  3. A bunch of Linker Errors...
    By Junior89 in forum Windows Programming
    Replies: 4
    Last Post: 01-06-2006, 02:59 PM
  4. Unknown Memory Leak in Init() Function
    By CodeHacker in forum Windows Programming
    Replies: 3
    Last Post: 07-09-2004, 09:54 AM
  5. Ok, Structs, I need help I am not familiar with them
    By incognito in forum C++ Programming
    Replies: 7
    Last Post: 06-29-2002, 09:45 PM