Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

over 6 years ago

Language

C++

Compiler

gcc 8.2.0

Options
Warnings
Boost 1.68.0
C++17
no pedantic

Author

anonymous

over 6 years ago

$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.68.0/gcc-8.2.0/include -std=c++17
prog.cc: In member function 'int ContainerStack::getCapacity()':
prog.cc:22:12: error: invalid use of member function 'std::vector<Container> ContainerStack::containers()' (did you forget the '()' ?)
     return containers.capacity();
            ^~~~~~~~~~
prog.cc:22:23: error: expected ';' before 'capacity'
     return containers.capacity();
                       ^~~~~~~~
                       ;
prog.cc:22:23: error: 'capacity' was not declared in this scope
     return containers.capacity();
                       ^~~~~~~~
prog.cc:22:23: note: suggested alternative: 'getCapacity'
     return containers.capacity();
                       ^~~~~~~~
                       getCapacity
prog.cc: In member function 'int ContainerStack::getSize()':
prog.cc:26:12: error: invalid use of member function 'std::vector<Container> ContainerStack::containers()' (did you forget the '()' ?)
     return containers.size();
            ^~~~~~~~~~
prog.cc:26:23: error: expected ';' before 'size'
     return containers.size();
                       ^~~~
                       ;
prog.cc:26:23: error: 'size' was not declared in this scope
     return containers.size();
                       ^~~~
prog.cc:26:23: note: suggested alternative:
In file included from /opt/wandbox/gcc-8.2.0/include/c++/8.2.0/string:51,
                 from /opt/wandbox/gcc-8.2.0/include/c++/8.2.0/bits/locale_classes.h:40,
                 from /opt/wandbox/gcc-8.2.0/include/c++/8.2.0/bits/ios_base.h:41,
                 from /opt/wandbox/gcc-8.2.0/include/c++/8.2.0/ios:42,
                 from /opt/wandbox/gcc-8.2.0/include/c++/8.2.0/ostream:38,
                 from /opt/wandbox/gcc-8.2.0/include/c++/8.2.0/iostream:39,
                 from prog.cc:1:
/opt/wandbox/gcc-8.2.0/include/c++/8.2.0/bits/range_access.h:252:5: note:   'std::size'
     size(const _Tp (&/*__array*/)[_Nm]) noexcept
     ^~~~
Exit Code:
1