"and" is not an operator in C++. Try && instead and use it like this:
Code:
else if ( (ngrade >= 80) && (ngrade < 90) )
{
lgrade = B;
}
Also:
Code:
#include "Calcgrades.h"
{
char lgrade, char ngrade, char A,char B,char C,char D,char F
Is that supposed to be a function? Maybe you meant:
Code:
char Calcgrades(char lgrade,char ngrade, char A,char B,char C,char D,char F)
{
//...
I don't know what they are teaching you in the class you are taking, but it isn't up to the standards.
Code:
#include <iostream> //unless you have an old compiler
#include "Calcgrades.h"
using namespace std; //again, if you have an old compiler this wont work
int main() //main is never void
{
At least change to int main(), but I'm guessing your compiler won't have the new headers.
Also, it doesn't seem like you are bothering to format your code at all, for example:
Code:
while (count < 10.0) // put at 10 for testing
{
char ngrade, lgrade;
Calcgrades(ngrade,A, B, C, D, F,lgrade);
cout << "lgrade after Calcgrades is: " <<lgrade<< endl;
}
I would indent the code inside the braces, and in you formatted your if statements oddly, but I suppose that is ok unless you have more than one line of code inside the braces
You probably have other problems, but that should get you started