Until you can compile without any errors or warnings, you should not try to run it. Warnings means that there's something wrong with your code. Never ignore warnings! Correct the warnings before retrying.

Most of the warnings you're getting are "control reaches end of non-void function". Quickly looking at your non-void functions, I see a chain of if-else-if's which have no final else. If none of the conditions being tested are true, then none of the return statements will be executed, leaving garbage in the memory location that the calling function will read in order to get the return value. There's no telling wild and weird garbage value your program will be using. You, as the programmer, must specify all possible return values of all your functions. Adding an else that sets a known value for failure is needed.

sry i wan to ask..wat happen at my view report?it does not view the rate

Just to prevent the next round of time wasted by you not having provided us with the information that we would need to help you.

When you ask for help with a program that isn't working, you need to provide us with this information:

Enough of your source code that we can compile into a program that will run and that still exhibits the problem.

A description of what you expect and what you get instead. Copy-and-paste of what you actually get can be very helpful. If "it doesn't work" means that it crashes, a statement to that effect helps (it's amazing how many people don't think to tell us that).

Test input data that will cause the bad output or crash. For us to test your program ourselves, we will need to know what input data to feed the program.

What compiler/IDE and what operating system you're using. Not usually that important, but sometimes absolutely vital to finding the solution.

And do not waste everybody's time by submitting code that does not compile cleanly, unless your "it doesn't work" refers to specific error messages and warnings that you get.

Remember: Never ignore warnings! Always turn warnings on and up! And never ignore warnings!

Whoops! I must have missed that - sorry, my mistake. It's possible that the flagging system isn't working properly. I'll have to look into it. PMs and emails (markr@imninjas.com) are more likely to get my attention.

I'll split this off into a new thread now.

Also yes, ouddy, please use code tags when you post code in the future. The way to do this is by adding [code] at the beginning of your code, and then [(backslash)code] to the end of it (where the word backslash is replaced by a / )

Code:

It will format your code like this
Into a little box
Except I don't have any code myself
So instead this looks like a little poem

dwise1_aol explained this pretty well in an above post. It's really solid advice, and an important rule around here! We'll have to start giving out warnings and infractions to you (which could lead to an eventual ban) if you can't follow it.

If it would make it easier for everyone else to read this thread, I can retroactively edit ouddy's posts to tag his [code]. Ouddy, you should be able to do this yourself, too, but it's possible that you're blocked from editing your posts as a new user. If you discover that to be the case, don't hesitate to contact me (now and in the future) and I can help.

Edit: Also, please start your own threads in the future when you have a question - don't tag onto other peoples' threads, especially those that are years old.

This is C++, not Visual Basic! and is not a reserved word in C++ nor does it have any meaning. Rather, the relational operator for ANDing is &&, which is what you had used in the first version of this program. Whatever had possessed you to change that to something that isn't even C++?

Not only that, but this function is one of several that throws a warning that "control reaches end of non-void function". That means that there is a path of execution in which the function does not return a value. I already pointed that out to you! Think about it. If you had written all the if and else-if conditions correctly, then the only possible condition left should be that marks < 40 in which case you should have no need to test for it explicitly. By testing for it explicitly as you are doing, you create one other possible path of execution that you are not handling, regardless of the fact that such an additional path would never be taken. The compiler cannot know that! All the compiler knows is that there is an additional possible path of execution that you are not handling.

When your compiler gives you error messages and warnings, the first thing you need to do is to correct those errors and those warnings. First fix what you know is broken. Rewriting your entire program not only does not address the problems, but it also adds new problems, which is exactly what just happened!

The secret to debugging is Don't Panic!. Then look at the code that threw that error or warning (the line number is right there in the error message and in the warning), figure out why that source code is not correct, and fix that specific problem. Do that with all errors and warnings, starting with the first one -- many of the subsequent errors and warnings can be caused by an earlier error (eg, if a variable declaration is bad and you use that variable in 100 places, then you will get one error and 100 warnings that that variable has not been declared; correct that one error and the 100 warnings disappear).

Be methodical. And do not panic and change everything for no reason other than that you are panicking.

This is C++, not Visual Basic! and is not a reserved word in C++ nor does it have any meaning. Rather, the relational operator for ANDing is &&, which is what you had used in the first version of this program. Whatever had possessed you to change that to something that isn't even C++?

Not only that, but this function is one of several that throws a warning that "control reaches end of non-void function". That means that there is a path of execution in which the function does not return a value. I already pointed that out to you! Think about it. If you had written all the if and else-if conditions correctly, then the only possible condition left should be that marks < 40 in which case you should have no need to test for it explicitly. By testing for it explicitly as you are doing, you create one other possible path of execution that you are not handling, regardless of the fact that such an additional path would never be taken. The compiler cannot know that! All the compiler knows is that there is an additional possible path of execution that you are not handling.

When your compiler gives you error messages and warnings, the first thing you need to do is to correct those errors and those warnings. First fix what you know is broken. Rewriting your entire program not only does not address the problems, but it also adds new problems, which is exactly what just happened!

The secret to debugging is Don't Panic!. Then look at the code that threw that error or warning (the line number is right there in the error message and in the warning), figure out why that source code is not correct, and fix that specific problem. Do that with all errors and warnings, starting with the first one -- many of the subsequent errors and warnings can be caused by an earlier error (eg, if a variable declaration is bad and you use that variable in 100 places, then you will get one error and 100 warnings that that variable has not been declared; correct that one error and the 100 warnings disappear).

Be methodical. And do not panic and change everything for no reason other than that you are panicking.

I'm no expert at C but its obvious that the OP is not only wasting their time but yours also, I'd rather ignore such posts (even more so when the user replies in a confused manner bailing out of topic, asking about pseudo-code and flow-charts!!). Declaring variables and not using them, ignoring so many compiler warnings and using "and" instead of logical operator && and who knows how many errors besides this, these are all red-flags indicating that the OP's messed up about his programming concepts and its best to give a small suggestion that they need to rewrite what they've written.

How many times do we have explained in the forum, to use '[CODE]' tags, grouping and indenting up code, search-the-f*cking-web (or at-least pay heed to what the compiler's saying) and most of all: Do not put up all code up at once, only post the part that (you know) has errors (and I'm pretty sure that the OP knows what the compiler means by those line numbers). Posting up all the code at once, even if using CODE tags, makes the code nigh unreadable, and even more when there's no proper formatting.

And this is not an instant-messaging service or irc of any kind, you're not supposed to use instant-messaging shortcuts here. Spelling sorry as sry, and need as nid makes you look like a semi-literate boob (as esr likes to say it).

There's always a "How To Post" sticky thread in each section and I can say with confidence that most new-members ignore all of them.

And the title too, "What happened at my view report?" doesn't give a clue about what you're trying to ask, and wastes the time of other members who go on the link to read this post. Try to refrain from using such pathetic headlines as your thread's title, as it affects (to some extent) how helpful answers you're gonna get.

And I don't know why most new members don't understand that,

We're (largely) volunteers. We take time out of busy lives to answer questions, and at times we're overwhelmed with them. So we filter ruthlessly. In particular, we throw away questions from people who appear to be losers in order to spend our question-answering time more efficiently, on winners.

I would not give my time to such people, I think its best to ignore such as they're only a waste of time.

What we are, unapologetically, is hostile to people who seem to be unwilling to think or to do their own homework before asking questions. People like that are time sinks — they take without giving back, and they waste time we could have spent on another question more interesting and another person more worthy of an answer. We call people like this “losers”.

You've given a great answer here man, you've my respect for that, in fact most people wouldn't have even answered. I think the OP was talking about the design, its highly likely that the OP started a random-walk without considering any design; and not knowing what design is enough to indicate that the OP doesn't know what he's talking about.