In file included from main.cpp:17:0:
figure.h:44:5: error: 'string' does not name a type; did you mean 'stdin'?
string Name() const {
^~~~~~
stdin
figure.h:63:5: error: 'string' does not name a type; did you mean 'stdin'?
string Name() const {
^~~~~~
stdin
figure.h: In function 'std::shared_ptr<Figure> CreateFigure(std::istringstream&)':
figure.h:77:5: error: 'string' was not declared in this scope
string kof;
^~~~~~
figure.h:77:5: note: suggested alternatives:
In file included from /usr/include/c++/7/iosfwd:39:0,
from /usr/include/c++/7/ios:38,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from main.cpp:1:
/usr/include/c++/7/bits/stringfwd.h:74:33: note: 'std::__cxx11::string'
typedef basic_string<char> string;
^~~~~~
/usr/include/c++/7/bits/stringfwd.h:74:33: note: 'std::__cxx11::string'
In file included from main.cpp:17:0:
figure.h:78:11: error: 'kof' was not declared in this scope
is >> kof;
^~~
figure.h:78:11: note: suggested alternative: 'feof'
is >> kof;
^~~
feof
figure.h:84:16: error: 'make_shared' was not declared in this scope
return make_shared<Rect>(w, h);
^~~~~~~~~~~
figure.h:84:16: note: suggested alternative:
In file included from /usr/include/c++/7/memory:81:0,
from main.cpp:12:
/usr/include/c++/7/bits/shared_ptr.h:703:5: note: 'std::make_shared'
make_shared(_Args&&... __args)
^~~~~~~~~~~
In file included from main.cpp:17:0:
figure.h:84:32: error: expected primary-expression before '>' token
return make_shared<Rect>(w, h);
^
figure.h:84:37: error: left operand of comma operator has no effect [-Werror=unused-value]
return make_shared<Rect>(w, h);
^
figure.h:92:16: error: 'make_shared' was not declared in this scope
return make_shared<Triangle>(a, b, c);
^~~~~~~~~~~
figure.h:92:16: note: suggested alternative:
In file included from /usr/include/c++/7/memory:81:0,
from main.cpp:12:
/usr/include/c++/7/bits/shared_ptr.h:703:5: note: 'std::make_shared'
make_shared(_Args&&... __args)
^~~~~~~~~~~
In file included from main.cpp:17:0:
figure.h:92:36: error: expected primary-expression before '>' token
return make_shared<Triangle>(a, b, c);
^
figure.h:92:41: error: left operand of comma operator has no effect [-Werror=unused-value]
return make_shared<Triangle>(a, b, c);
^
figure.h:92:44: error: right operand of comma operator has no effect [-Werror=unused-value]
return make_shared<Triangle>(a, b, c);
^
figure.h:98:16: error: 'make_shared' was not declared in this scope
return make_shared<Circle>(r);
^~~~~~~~~~~
figure.h:98:16: note: suggested alternative:
In file included from /usr/include/c++/7/memory:81:0,
from main.cpp:12:
/usr/include/c++/7/bits/shared_ptr.h:703:5: note: 'std::make_shared'
make_shared(_Args&&... __args)
^~~~~~~~~~~
In file included from main.cpp:17:0:
figure.h:98:34: error: expected primary-expression before '>' token
return make_shared<Circle>(r);
^
cc1plus: all warnings being treated as errors
|