Page 4 of 4 FirstFirst ... 234
Results 31 to 40 of 40

Thread: What is wrong with this code?

  1. #31
    Join Date
    Dec 2004
    Posts
    261
    Rep Power
    0

    Default

    hey did you create and populate an array of records.store records into a file name books?
    I am str88,no curves no bends.
    nokia rocks(iphone too)

    21.5 emachice 1080p .... intel core 2 quad q6600 ... 4gig ocz memory ....h/d 320g....gpu ati hd 5750 1gddr5..m/B..intel

  2. #32
    Join Date
    Jul 2002
    Posts
    1,395
    Rep Power
    0

    Default

    Quote Originally Posted by theo View Post
    hey did you create and populate an array of records.store records into a file name books?
    I was planning to use fwrite. Anyway, I turned it in. It is incomplete, but the due date has passed. Glad I didn't do it in group. I know I would have got nowhere.

    It is best to use a structure to contain the arrays pertaining to a specific subject. In this case, the credentials of a book.

  3. #33
    Join Date
    Jul 2002
    Posts
    1,395
    Rep Power
    0

    Default

    The outlook for this school term is so grim. I haven't been attending much and they are the 3 subjects I genuinely fail at: C programming; Computer Architecture; and Probability and Statistics. I think after examinations I should quit school and go find a job.

  4. #34
    Join Date
    Dec 2004
    Posts
    261
    Rep Power
    0

    Default

    Quote Originally Posted by carey View Post
    The outlook for this school term is so grim. I haven't been attending much and they are the 3 subjects I genuinely fail at: C programming; Computer Architecture; and Probability and Statistics. I think after examinations I should quit school and go find a job.
    maths not my thing,computer arc is not so bad to me....that same course i have to turn it in next week...
    I am str88,no curves no bends.
    nokia rocks(iphone too)

    21.5 emachice 1080p .... intel core 2 quad q6600 ... 4gig ocz memory ....h/d 320g....gpu ati hd 5750 1gddr5..m/B..intel

  5. #35
    Join Date
    Jun 2008
    Posts
    74
    Rep Power
    0

    Default

    Quote Originally Posted by carey View Post
    The outlook for this school term is so grim. I haven't been attending much and they are the 3 subjects I genuinely fail at: C programming; Computer Architecture; and Probability and Statistics. I think after examinations I should quit school and go find a job.
    Don't give up, there is summer. It's hard out there without the paper so you should try to get it. Might be tough but try to keep at it.

  6. #36
    Join Date
    Jul 2002
    Posts
    1,395
    Rep Power
    0

    Default

    Well, it is due 3 p.m. today. Doing the code over. Hope I meet the deadline.

  7. #37
    Join Date
    Jul 2002
    Posts
    1,395
    Rep Power
    0

    Default

    http://ideone.com/oDk5q

    A bit of a recode.

  8. #38
    Join Date
    May 2003
    Posts
    229
    Rep Power
    0

    Default

    Carey,

    I'm impressed. This is a very sophisticated program for someone just learning C. Anyway, I did notice an error. Basically your error handling is not adequate when your proram can't open the data file. In a real program this would be a big issue but since this is a student project I don't know how big an issue this is (depends on how strict the person grading this project is going to be).

    Oh, I just noticed that the due date for this project has passed.
    Last edited by sking; Apr 22, 2012 at 10:57 PM. Reason: I want to add to it.

  9. #39
    Join Date
    Jul 2002
    Posts
    1,395
    Rep Power
    0

    Default

    Quote Originally Posted by sking View Post
    Carey,

    I'm impressed. This is a very sophisticated program for someone just learning C. Anyway, I did notice an error. Basically your error handling is not adequate when your proram can't open the data file. In a real program this would be a big issue but since this is a student project I don't know how big an issue this is (depends on how strict the person grading this project is going to be).

    Oh, I just noticed that the due date for this project has passed.
    Yes. My time management is seriously off; I may be very late for my own funeral. Going to try separating the code into 3 applications.

  10. #40
    Join Date
    Jul 2002
    Posts
    1,395
    Rep Power
    0

    Default

    I have not done anything in months. Goes without saying: I need some mental WD40! In forcing myself to practice [practice isn't spelled "practise" anymore?] I came up with this: http://ideone.com/NFl93 . How would you do it? Are there any C functions that do this job the right way? How much simpler could it get?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •