#include <iostream>
usingnamespace 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 ^^
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.