Debug help needed.

I'm currently busy with a C++ course, in a chapter about handling batches of data.
The Chapter starts of with this set of code...
At the moment I seem to have a clear understanding of what is happening in this program.

When i try to Compile and build this script it throws out a big set of errors.
I'm typing the code in gedit and compiling with g++ via terminal(which i have done countless times)
I've come to the conclusion that the includes are the main suspect.
Is there some sort of "include" package I need to download and compile like the <aleggro.h> file?
I'm using Fedora 17

The code is as follows:
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
#include <iostream>
#include <ios>
#include <iomanip>
#include <string>

using std:: cout;		using std::setprecision;
using std::cin;			using std::string;
using std::endl;		using std::streamsize;

int main()
{
	cout << " Please enter your first name?" << endl;
	string name;
	cin >> name;
	cout << "Hello " << name << "!" << endl;
	
	cout << "Please enter your midterm and final exam grades: ";
	double midterm, final;
	cin >> midterm << final;

	cout << " Enter all your homework grades,"
		"followed by end-of-file";
	
	int count = 0;
	double sum = 0;
	double x;
 
	while (cin >> x)
	{
		++count;
		sum += x;
	}

	double formula = 0.2 * midterm + 0.4 * final + 0.4 * sum / count;

	streamsize prec = cout.precision();
	cout 	<< "Your final grade is: " << setprecision(3)
		<< formula << setprecision(prec) << endl;
	
	return 0;
}


If you guys have any ideas of what the problem can be I'm open for any ideas.
Try compiling it your selfs and see the errors for yourself.
On line 19 you wrote << when it should be >>.
haha i was about to remove topic after i found the problem with Qt's debugger! Thanks for the reply mate.
whole afternoon wasted!
Topic archived. No new replies allowed.