Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- scht.cpp: In static member function ‘static std::string scht::getFriend(int)’:
- scht.cpp:24:70: error: ISO C++ forbids casting to an array type ‘std::string [] {aka std::basic_string<char> []}’
- string scht::getFriend(int index) { return (string[])friends.at(index); }
- ^
- In file included from /usr/include/c++/4.8/vector:64:0,
- from scht.cpp:2:
- /usr/include/c++/4.8/bits/stl_vector.h: In instantiation of ‘std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) [with _Tp = std::basic_string<char> []; _Alloc = std::allocator<std::basic_string<char> []>; std::vector<_Tp, _Alloc>::reference = std::basic_string<char> (&)[]; std::vector<_Tp, _Alloc>::size_type = long unsigned int]’:
- /usr/include/c++/4.8/bits/stl_vector.h:813:16: required from ‘std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::at(std::vector<_Tp, _Alloc>::size_type) [with _Tp = std::basic_string<char> []; _Alloc = std::allocator<std::basic_string<char> []>; std::vector<_Tp, _Alloc>::reference = std::basic_string<char> (&)[]; std::vector<_Tp, _Alloc>::size_type = long unsigned int]’
- scht.cpp:24:70: required from here
- /usr/include/c++/4.8/bits/stl_vector.h:771:41: error: invalid use of array with unspecified bounds
- { return *(this->_M_impl._M_start + __n); }
- ^
- In file included from /usr/include/c++/4.8/vector:69:0,
- from scht.cpp:2:
- /usr/include/c++/4.8/bits/vector.tcc: In instantiation of ‘void std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {std::basic_string<char, std::char_traits<char>, std::allocator<char> > []}; _Tp = std::basic_string<char> []; _Alloc = std::allocator<std::basic_string<char> []>]’:
- /usr/include/c++/4.8/bits/stl_vector.h:920:36: required from ‘void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = std::basic_string<char> []; _Alloc = std::allocator<std::basic_string<char> []>; std::vector<_Tp, _Alloc>::value_type = std::basic_string<char> []]’
- scht.cpp:33:37: required from here
- /usr/include/c++/4.8/bits/vector.tcc:98:6: error: cannot increment a pointer to incomplete type ‘std::basic_string<char> []’
- ++this->_M_impl._M_finish;
- ^
- In file included from /usr/include/c++/4.8/vector:64:0,
- from scht.cpp:2:
- /usr/include/c++/4.8/bits/stl_vector.h: In instantiation of ‘std::vector<_Tp, _Alloc>::size_type std::vector<_Tp, _Alloc>::size() const [with _Tp = std::basic_string<char> []; _Alloc = std::allocator<std::basic_string<char> []>; std::vector<_Tp, _Alloc>::size_type = long unsigned int]’:
- /usr/include/c++/4.8/bits/stl_vector.h:793:10: required from ‘void std::vector<_Tp, _Alloc>::_M_range_check(std::vector<_Tp, _Alloc>::size_type) const [with _Tp = std::basic_string<char> []; _Alloc = std::allocator<std::basic_string<char> []>; std::vector<_Tp, _Alloc>::size_type = long unsigned int]’
- /usr/include/c++/4.8/bits/stl_vector.h:812:20: required from ‘std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::at(std::vector<_Tp, _Alloc>::size_type) [with _Tp = std::basic_string<char> []; _Alloc = std::allocator<std::basic_string<char> []>; std::vector<_Tp, _Alloc>::reference = std::basic_string<char> (&)[]; std::vector<_Tp, _Alloc>::size_type = long unsigned int]’
- scht.cpp:24:70: required from here
- /usr/include/c++/4.8/bits/stl_vector.h:646:50: error: invalid use of array with unspecified bounds
- { return size_type(this->_M_impl._M_finish - this->_M_impl._M_start); }
- ^
- In file included from /usr/include/x86_64-linux-gnu/c++/4.8/bits/c++allocator.h:33:0,
- from /usr/include/c++/4.8/bits/allocator.h:46,
- from /usr/include/c++/4.8/string:41,
- from /usr/include/c++/4.8/bits/locale_classes.h:40,
- from /usr/include/c++/4.8/bits/ios_base.h:41,
- from /usr/include/c++/4.8/ios:42,
- from /usr/include/c++/4.8/ostream:38,
- from /usr/include/c++/4.8/iostream:39,
- from scht.cpp:1:
- /usr/include/c++/4.8/ext/new_allocator.h: In instantiation of ‘void __gnu_cxx::new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = std::basic_string<char> []; _Args = {std::basic_string<char, std::char_traits<char>, std::allocator<char> > []}; _Tp = std::basic_string<char> []]’:
- /usr/include/c++/4.8/bits/alloc_traits.h:254:4: required from ‘static typename std::enable_if<std::allocator_traits<_Alloc>::__construct_helper<_Tp, _Args>::value, void>::type std::allocator_traits<_Alloc>::_S_construct(_Alloc&, _Tp*, _Args&& ...) [with _Tp = std::basic_string<char> []; _Args = {std::basic_string<char, std::char_traits<char>, std::allocator<char> > []}; _Alloc = std::allocator<std::basic_string<char> []>; typename std::enable_if<std::allocator_traits<_Alloc>::__construct_helper<_Tp, _Args>::value, void>::type = void]’
- /usr/include/c++/4.8/bits/alloc_traits.h:393:57: required from ‘static decltype (_S_construct(__a, __p, (forward<_Args>)(std::allocator_traits::construct::__args)...)) std::allocator_traits<_Alloc>::construct(_Alloc&, _Tp*, _Args&& ...) [with _Tp = std::basic_string<char> []; _Args = {std::basic_string<char, std::char_traits<char>, std::allocator<char> > []}; _Alloc = std::allocator<std::basic_string<char> []>; decltype (_S_construct(__a, __p, (forward<_Args>)(std::allocator_traits::construct::__args)...)) = <type error>]’
- /usr/include/c++/4.8/bits/vector.tcc:97:40: required from ‘void std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {std::basic_string<char, std::char_traits<char>, std::allocator<char> > []}; _Tp = std::basic_string<char> []; _Alloc = std::allocator<std::basic_string<char> []>]’
- /usr/include/c++/4.8/bits/stl_vector.h:920:36: required from ‘void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = std::basic_string<char> []; _Alloc = std::allocator<std::basic_string<char> []>; std::vector<_Tp, _Alloc>::value_type = std::basic_string<char> []]’
- scht.cpp:33:37: required from here
- /usr/include/c++/4.8/ext/new_allocator.h:120:4: error: invalid use of array with unspecified bounds
- { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement