Like Tree1Likes

Grades calculating program help please!

This is a discussion on Grades calculating program help please! within the C Programming forums, part of the General Programming Boards category; Originally Posted by hotshotennis An fclose(spSorted) at the very end of the program, right? Yes!...

  1. #91
    Registered User claudiu's Avatar
    Join Date
    Feb 2010
    Location
    London, United Kingdom
    Posts
    2,094
    Quote Originally Posted by hotshotennis View Post
    An fclose(spSorted) at the very end of the program, right?
    Yes!
    1. Get rid of gets(). Never ever ever use it again. Replace it with fgets() and use that instead.
    2. Get rid of void main and replace it with int main(void) and return 0 at the end of the function.
    3. Get rid of conio.h and other antiquated DOS crap headers.
    4. Don't cast the return value of malloc, even if you always always always make sure that stdlib.h is included.

  2. #92
    Registered User
    Join Date
    Jan 2012
    Posts
    166
    Quote Originally Posted by claudiu View Post
    Yes!
    Great, THANK YOU SOOOOOO MUCH. I would never have been able to complete this without you! You have amazing patience with all of my stupidity throughout the night. Well, I'm off to take a nap(only a few hours till class) lol
    THANK YOU AGAIN!!!

  3. #93
    Registered User claudiu's Avatar
    Join Date
    Feb 2010
    Location
    London, United Kingdom
    Posts
    2,094
    Enjoy! DON'T SLEEP THROUGH IT, might be a better idea to stay awake... go outside and walk just don't rest your eyes and wake up 5 hours after the deadline.
    1. Get rid of gets(). Never ever ever use it again. Replace it with fgets() and use that instead.
    2. Get rid of void main and replace it with int main(void) and return 0 at the end of the function.
    3. Get rid of conio.h and other antiquated DOS crap headers.
    4. Don't cast the return value of malloc, even if you always always always make sure that stdlib.h is included.

  4. #94
    Registered User
    Join Date
    Jan 2012
    Posts
    166
    Quote Originally Posted by claudiu View Post
    Enjoy! DON'T SLEEP THROUGH IT, might be a better idea to stay awake... go outside and walk just don't rest your eyes and wake up 5 hours after the deadline.
    hahaha No, I'm up and awake now. Set two alarms just in case.

Page 7 of 7 FirstFirst 1234567
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help! calculating grades
    By anlk5910 in forum C++ Programming
    Replies: 7
    Last Post: 10-12-2011, 05:03 PM
  2. Having problem with a program for Calculating Grades
    By Magmadragoon in forum C Programming
    Replies: 17
    Last Post: 02-15-2011, 08:21 AM
  3. calculating gpa with only grades?
    By ashlee in forum C Programming
    Replies: 8
    Last Post: 11-03-2010, 11:18 AM
  4. Calculating grades
    By Ducky in forum C++ Programming
    Replies: 0
    Last Post: 03-14-2008, 01:16 AM
  5. Replies: 13
    Last Post: 08-15-2002, 10:20 AM

Tags for this Thread


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