An error I cant seem to pinpoint

closed account (L3ApX9L8)
This is what it says:
error C2969: syntax error : ';' : expected member function definition to end with '}'

but I believe all is set-up correctly...
anyway, here's 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#include <iostream>

using namespace std;

	class Horbar
{
	public:
		Horbar (int l)
		{
			cout << "+";
			for (int i = 0; i < l; ++l)
				cout << "-";
			cout << "+\n";

		}

};

	class Verbar
{
	public:
		Verbar (int d)
		{
			for (int i = 0; i < d; ++d)
				cout << "|\n";
		}
};
	
	class Blueprint
{
	public:
	Blueprint (int hor, int ver)
	: _upper (hor, ver)
      _middle (ver)
      _lower (hor, ver)
	}
	
	private:
		Horbar _upper;
		Verbar _middle;
		Horbar _lower;
	};

		
	void main()
{
	
Blueprint ladder (5,2);

};


I use the VC++ 6 compiler, which i know is quite old, but is the only one i havev at hand... Could it be something related to the compiler, as oposed to the code itself? anyway, thanks for whatever you can give me ^^
http://www.microsoft.com/express/vc/

Line 36: Closing brace meant for the function closes the class. Replace with {}.
closed account (L3ApX9L8)
Tried that...
And nin errors jumped out of nowhere to get me ... T_T
Please repost with proper alignment so that the code is readable. You are also trying to construct horbar instances incorrectly. The constructor only takes one parameter.
closed account (L3ApX9L8)
Turns out it was a conbination of both things...
Thanks for the help ^^ now i can finally continue with this =p
Topic archived. No new replies allowed.