BASIC question about classes

What's the error in the follwoing program?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <iostream>
using namespace std;

class a{
public:
	void set(int x){num = x;}
	int get(){return num;}
private:
	int num;
}

int main(){
	a b;
	b.set(45);
	cout << b.get();
	return 0;
}
You need to put a semicolon at the end of line 10.
Thanks, can you tell me when to put ; at the end of line 6 and 7?
Topic archived. No new replies allowed.