ID 5746863
Пользователь Юрочкин Руслан Викторович
Время 01:02<< 13.11.2021 01:02 (23 д. 23:03) 01:04>>
Обработка 01:02 ... 01:02 (3,82 сек.)
Файл figure.h (CLang++ 5.0.0 + Address Sanitizer)
Турнир 2 курс. Программирование на C++. Турнир 2, осень 2021
Задача A: Набор фигур
Набор тестов
Ограничения Время: 1с Память: 4096Мб
Состояние  [?]
CE Ошибка компиляции
код | результаты
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
0.086s 0.008s 9