Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "Square.h"
- #include "tools.hpp"
- ostream&
- Square :: print(ostream& s)
- {
- return s << "Square [" << row << " " << column << "]" << endl;
- }
- ostream&
- SqState :: print(ostream& sq)
- {
- return sq << "value: " << sq_value;
- }
- void testSquare();
- void testSqState();
- int main()
- {
- banner();
- testSquare();
- testSqState();
- bye();
- }
- void testSqState()
- {
- SqState sq('-', 4, 0);
- sq.print(ostream s); // << Error occurs here
- }
- void testSquare()
- {
- Square s(4, 0);
- s.print(ostream st); // << Error occurs here
- }
- SqState sq('-', 4, 0);
- sq.print(ostream s);
- ostream&
- SqState :: print(ostream& sq)
- {
- return sq << "value: " << sq_value;
- }
- sq.print(std::cout);
- void testSqState() {
- SqState sq('-', 4, 0);
- sq.print(std::cout);
- }
- void testSquare() {
- Square s(4, 0);
- s.print(std::cout);
- }
- **sq.print(ostream s);**
- **s.print(ostream st);**
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement