Please help with Arrays and Bool

This is a discussion on Please help with Arrays and Bool within the C++ Programming forums, part of the General Programming Boards category; Hello,
Im new to this forum and I really need help with this newbie problem. I've been struggling with this ...

Please help with Arrays and Bool

Hello,
Im new to this forum and I really need help with this newbie problem. I've been struggling with this assignment for very long now. I'm not even sure how to start the code right, as well as the structure of it. My code is a complete mess, and Im not sure what I'm brainstorming here. Any help is appreciated. Here's whats being asked of me:

In a loop your program should do the following (you can use a do/while):

receive as data input the weights (proportions) for the four exam grades, and put these into an array called weights.
Read in 4 test grades into another array called grades.
Use the following test data for one example:
weights for exams: .10, .20, .25, .45
first student record: 75, 87, 79, 92

make up the rest yourself.
call the function isitvalid() passing in the grades array, the function returns a bool (i.e. a boolean value).
The function isitvalid() will determine whether or not the values in this array are valid. It will return true/1 for valid and false/0 if it's invalid. The function will return invalid if any grade in the array is not a valid grade (i.e. it's greater than 100 or less than 0). If the function returns false, your main program should read 4 values into the grades array again.
You should calculate and print the final grade, which is the weighted average.
Next your program will allow the user to see the any number of their test scores. For example. Your program can display a message such as: "If you don't believe the score is correct, how many of your grades would you like to see?", and it should call a function printarray() which takes two parameters, the array, and the number of grades the user would like to see..
The function printarray() does not return anything, it will print out the number of grades the user would like to see. For example if the user passed the number 2, it will print the first two grades from the grades array.
Your program will ask the user if s/he would like to enter another student.
At the end of your program, you should print the class average i.e. the average of all the final grades combined.

Ok thank you, but which parameters should I use in order for main to call the function properly and where do I need to put the function in the main for it to be actually checking the grades. It also has to go back to intitializing grades[] if false, how will my logic look for it to work this way?
Here's what I got so far, but Im not sure what its doing. Plus in this configuration it says " [Warning] the address of `bool isitvalid(double*)', will always evaluate as `true' ".

You can't call isitvalid() until after all the grades have been entered - right now you're calling it after each grade is entered. Also, inside isitvalid(), you have false and true backwards - you need to check each grade to see if it's INvalid, and if so return false - otherwise return true. Finally, you should indent consistently - say a fixed number of spaces or tabs per indentation level.

Edit: I misunderstood how you're calling isitvalid() - it looks like you're checking your data after entering all of it, but it should be

But, my function is just not doing anything because its wrong. I dont understand when you say i have it backwards. I'm a newb to this so for me even putting right parameters is hard. Also I dont understand even if it works and returns "false" then how can I make it go back and cycle through grades again? I'd really appreciate it if you could take piece of my code and put it in right C++ context such as right parameters and proper logic in function so I could keep working on it. Thanks for all your help.

Also I have another improperly structured function to attach that needs to ask which grades to print to screen from array here it is so far:

I spent 2 days including thanksgiving working on this code, please try to give me little bit more detail on how to put these 2 functions together with main. Looks like such a simple task and I cant even get it close to working.

It should be "||", not "&&". Also, the "else" shouldn't be there, and the "return true;" should be _outside_ the loop. Remember that you can never return true until all grades have been validated, but you can return false if a single grade isn't valid. So "return false;" should be inside the loop, and "return true;" should be outside the loop. Take another look at my pseudocode above.

I've done it the way you told me, but it still always returns it as "true".
I think its because of my function parameter (double grades[]), its not checking the numbers in grades[] array in the main function.