Thread: Binary File handling

  1. #1
    Registered User
    Join Date
    Sep 2009
    Posts
    4

    Unhappy Binary File handling

    Hi guys i need some help.

    Program is as follows -

    Create a structure stud(roll no, name, perc). write a menu driven prog to perform funtion on a binary file "student.dat". functions are -
    a) add a student
    b)search (by name n by roll no)
    c) display

    Please guys i need it urgently. HAALP!

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Ok, first, you should create a structure named stud with some members, such as roll no, maybe a name, and possibly a perc member. Once you have that done, you should write a menu driven program to perform functions on a file ... maybe call it student.dat. You could have menu choices such as add student, search ... maybe by a couple of ways, such as by name or roll no? Oh, and something to display something also would be good.

    Glad to be of assistance!

    Quzah.
    Hope is the first step on the road to disappointment.

  3. #3
    Registered User
    Join Date
    Oct 2009
    Location
    While(1)
    Posts
    377
    Try to write it man what are you waitin for that somebody will write for you what kind of person you are

  4. #4
    Registered User
    Join Date
    Sep 2009
    Posts
    4
    Dudes, i need the code.

  5. #5
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Tough ......... Get your ass to work.


    Quzah.
    Hope is the first step on the road to disappointment.

  6. #6
    Registered User
    Join Date
    Sep 2009
    Posts
    4
    Don't try to act smart. I am in dire need of the code.

  7. #7
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    No one cares. We're not here to do your work for you. If you aren't making an effort, get off of the forums.


    Quzah.
    Hope is the first step on the road to disappointment.

  8. #8
    Registered User
    Join Date
    Oct 2009
    Location
    While(1)
    Posts
    377
    What you can do Mr. codec_supreme that pay 100 $ to Mr quzah or any of the forum member then you will get help

    and on your situation what i can just say simply
    haaaaaaaaa haaaaaaaaaaaaaaaaa haaaaaaaaaaaaaaaaaaa haaaaaaaaaaaaaa

  9. #9
    Registered User
    Join Date
    Sep 2009
    Posts
    4
    Ok how can i use fstream?

  10. #10
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    fstream is C++. I assume, that since you have an assignment, that you have a book? You should consider reading it.


    Quzah.
    Hope is the first step on the road to disappointment.

  11. #11
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    You're in the wrong forum, codec-supreme.

    fstream is part of C++, not C. If you want to write it in C, you may need to set your compiler or IDE options to use the C compiler, instead of the C++ compiler (and help maybe, also).

    Your filename also needs to have the dot c extension on it, not dot cpp.

    For C, you'll want fopen() and fread and fwrite.

    Is your class in C or C++ ? Both languages can do this assignment, easily.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Newbie homework help
    By fossage in forum C Programming
    Replies: 3
    Last Post: 04-30-2009, 04:27 PM
  2. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM
  3. Binary Search Trees Part III
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 10-02-2004, 03:00 PM
  4. what does this mean to you?
    By pkananen in forum C++ Programming
    Replies: 8
    Last Post: 02-04-2002, 03:58 PM