IntelliSense Error.

//If you don't want the story, see problem

Hi everyone been creeping on the Forums for about 4 days now. Haven't done C++ since High School and a friend sparked my interest, so I decided to pick it up as a hobby and help him with his projects and possible create some of my own to give to various communities.

Instead of jumping into extravagant code I figured I'd get used to Visual Studio 2013 and it's features along with brushing up on every thing. I decided to start fresh with very newbie programs.

Problem:
I get "IntelliSense: this declaration has no storage class or type specifier." "Line 29"
Thanks in advanced for the help.

This is my code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include <iostream>
using namespace std;

int main()
{
	int grades[5] = { 70, 80, 85, 60, 95 };

	int sum = grades[0] + grades[1] + grades[2] + grades[3] + grades[4];
	
	int aver = sum / 5;
	
	if (aver >= 90)
		cout << "Grade average is a: A!" << endl;

	else if (aver <= 89 && aver >= 80)
		cout << "Grade average is a: B!" << endl;

	else if (aver <= 79 && aver >= 70)
		cout << "Grade average is a: C!" << endl;

	else if (aver <= 69 && aver >= 60)
		cout << "Grade average is a: D!" << endl;

	else
		cout << "Grade average is a: F!" << endl;

	cin.get();
	return 0;
}
Last edited on
Seems there was a character after the closing } for the program. Thanks to anyone we was looking to help :D Couldn't see it at all in the VS!!! Ugh I swear it seems to be more of a headache than it's worth.
This is the final code if anyone were following this.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#include <iostream>
using namespace std;

int main()
{
	int grades[5];
	cout << "Enter 5 grades (1-100 only)" << endl;
	cout << "Please enter the first grade." << endl;
	cin >> grades[0];

	cout << "Please enter the second grade." << endl;
	cin >> grades[1];

	cout << "Please enter the third grade." << endl;
	cin >> grades[2];

	cout << "Please enter the fourth grade." << endl;
	cin >> grades[3];

	cout << "Please enter the fifth grade." << endl;
	cin >> grades[4];

	cout << "You chose: " << grades[0]<< ", " << grades[1] << ", " << grades[2] << ", " << grades[3] << ", " << grades[4] << "." << endl;

	int sum = grades[0] + grades[1] + grades[2] + grades[3] + grades[4];
	
	int aver = sum / 5;
	
	
	if (aver >= 90)
		cout << "The grade average is a: A!" << endl;

	else if (aver <= 89 && aver >= 80)
		cout << "The grade average is a: B!" << endl;

	else if (aver <= 79 && aver >= 70)
		cout << "The grade average is a: C!" << endl;

	else if (aver <= 69 && aver >= 60)
		cout << "The grade average is a: D!" << endl;

	else
		cout << "The grade average is a: F!" << endl;

	cin.get();
	return 0;

}


Feel free to comment, critique/suggest. All are welcomed :)
Topic archived. No new replies allowed.