An Error I need help with

I'm getting this error when I run the program below. I don't know how to fix it---- "1>c:\users\sewel1\documents\visual studio 2010\projects\w\w\w1.cpp(67): fatal error C1075: end of file found before the left brace '{' at 'c:\users\sewel1\documents\visual studio 2010\projects\w\w\w1.cpp(5)' was matched"

#include <iostream>
using namespace std;
int main ()
{
int hw1, hw2, hw3, hw4, hw5, hw6, quiz1, quiz2, quiz3, test1, test2, ec1, ec2, ec3, ec4, ec5;
int totalhw = 0, totalquiz = 0, totaltest = 0, totalec = 0, grade = 0;

cout << ("Enter your grade for homework 1: ");
cin >> hw1;
cout << ("Enter your grade for homework 2: ");
cin >> hw2;
cout << ("Enter your grade for homework 3: ");
cin >> hw3;
cout << ("Enter your grade for homework 4: ");
cin >> hw4;
cout << ("Enter your grade for homework 5 ");
cin >> hw5;
cout << ("Enter your grade for homework 6: ");
cin >> hw6;
totalhw += hw1 + hw2 + hw3 + hw4 +hw5+ hw6;

cout << ("Enter your grade for quiz 1: ");
cin >> quiz1;
cout << ("Enter your grade for quiz 2: ");
cin >> quiz2;
cout << ("Enter your grade for quiz 3: ");
cin >> quiz3;
totalquiz += quiz1 +quiz2, quiz3;

cout << ("Enter your grade for test 1: ");
cin >> test1;
cout << ("Enter your grade for test 2: ");
cin >> test2;
totaltest += test1 + test2;

cout << ("Enter your grade for extra credit 1: ");
cin >> ec1;
cout << ("Enter your grade for extra credit 2: ");
cin >> ec2;
cout << ("Enter your grade for extra credit 3: ");
cin >> ec3;
cout << ("Enter your grade for extra credit 4: ");
cin >> ec4;
cout << ("Enter your grade for extra credit 5: ");
cin >> ec5;
totalec += ec1 + ec2 + ec3 +ec4 +ec5;
grade += totalhw +totalquiz + totaltest + totalec;

if(grade >= 450) {
cout << (" your grade is an A, you are exempt");
}
if(grade >=400) {
cout << ("your grade is a B, you are not exempt");
}
if(grade >= 350) {
cout << ("your grade is a C, you are not exempt");
}
if(grade >= 300) {
cout <<("your grade is a D, you are not exempt");
}
else{
cout << ("your grade is a F, you are not exempt");

return 0;
}
1. Use code tags to show code:

[code]
1
2
//Code goes here
//It gets line numbers automatically. 
[/code]

2. The error means exactly what it says: A Left brace is not match with a right brace. Do some brace matching.
You are missing a } at the end before the return.

And what is this comma doing here? totalquiz += quiz1 +quiz2, quiz3;
That line is equivalent to totalquiz += quiz3;
oh wow -__- ..I feel slow. I fixed it
Topic archived. No new replies allowed.