c++ result sheet program problem

which is the best book to ace c++

  • reeta sahoo

    Votes: 0 0.0%
  • together

    Votes: 0 0.0%

  • Total voters
    4
  • Poll closed .
Status
Not open for further replies.

star16

Right off the assembly line
i made a project on student's result sheet in c++ for submitting in school.I have wasted lot of time in order to remove that problem and still i m unable to sort it out.The program is running properly but it is giving problem in the ouput.
i have created 7 functions in the program Their work is as follow:
function 1 : MAKE REPORT CARD
2. APPEND NAMES
3. SORT NAMES
4. SEARCH A NAME
5. UPDATE GRADE
6. VIEW REPORT CARD
7. LIST OF FAILURES
8. MAIN MENU
function 1 and 2 are working properly(to add details of students )
rest of the functions are not working properly except the function 7 which displays the list of failures
when i enter values in function 1 and2 it accepts those values. But when i sort names according alphabetically then it displays only those names in the output which were appended by function 2,It gives zero for the values added in function 1
In function 4 of searching also, it doesnt displays anything .Function 6 of viewing report cards is also not working
Can you suggest me what could be the problem in the program I am sending you the program.
 

Liverpool_fan

Sami Hyypiä, LFC legend
I would say any book but Sumita Arora. It is OK for getting good marks for CBSE 11-12, but if you want to become a decent programmer. Go for Robert Lafore.
Just keep in mind:
In the book:
(1) Use int main() and return 0; instead of void main() in any example
(2) Do not use gets(), use fgets() instead
i.e. instead wherever there is gets(buffer), use:
Code:
fgets(buffer, sizeof(buffer), stdin);
char *newline = strchr(buffer, '\n' );
if (newline) *newline = '\0';

Though in exam, use gets(), not in practice though.

(If you don't understand the above statements don't worry; you'll know soon enough)
 
Status
Not open for further replies.
Top Bottom