# c++ result sheet program problem



## star16 (Jan 27, 2009)

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.


----------



## BSOD (Jan 27, 2009)

Except Robert Lafore, all the other books plain suck.


----------



## star16 (Jan 27, 2009)

ya you are right
They really sucks!!!!!


----------



## dheeraj_kumar (Jan 27, 2009)

Havent read LaFore, but I read and liked Sumita Arora, so I can recommend it.


----------



## Liverpool_fan (Jan 27, 2009)

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:

```
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)


----------



## BSOD (Jan 28, 2009)

star16 said:


> ya you are right
> They really sucks!!!!!



Am I the only one who thought of Gollum?


----------

