/ Vijos /

记录详情

Compile Error

/in/foo.cc: In function 'void Parse(std::__cxx11::string&, std::vector<Val>&)':
/in/foo.cc:22:50: error: no matching function for call to 'std::__cxx11::basic_string<char>::assign(std::__cxx11::string&, std::size_t&)'
             if(pos!=T.length())t.Par.assign(T,pos);
                                                  ^
In file included from /usr/include/c++/6/string:52:0,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/basic_string.h:1194:7: note: candidate: std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::assign(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]
       assign(const basic_string& __str)
       ^~~~~~
/usr/include/c++/6/bits/basic_string.h:1194:7: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/6/bits/basic_string.h:1210:7: note: candidate: std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::assign(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]
       assign(basic_string&& __str)
       ^~~~~~
/usr/include/c++/6/bits/basic_string.h:1210:7: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/6/bits/basic_string.h:1233:7: note: candidate: std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::assign(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]
       assign(const basic_string& __str, size_type __pos, size_type __n)
       ^~~~~~
/usr/include/c++/6/bits/basic_string.h:1233:7: note:   candidate expects 3 arguments, 2 provided
/usr/include/c++/6/bits/basic_string.h:1249:7: note: candidate: std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::assign(const _CharT*, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]
       assign(const _CharT* __s, size_type __n)
       ^~~~~~
/usr/include/c++/6/bits/basic_string.h:1249:7: note:   no known conversion for argument 1 from 'std::__cxx11::string {aka std::__cxx11::basic_string<char>}' to 'const char*'
/usr/include/c++/6/bits/basic_string.h:1265:7: note: candidate: std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::assign(const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]
       assign(const _CharT* __s)
       ^~~~~~
/usr/include/c++/6/bits/basic_string.h:1265:7: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/6/bits/basic_string.h:1282:7: note: candidate: std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::assign(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type, _CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]
       assign(size_type __n, _CharT __c)
       ^~~~~~
/usr/include/c++/6/bits/basic_string.h:1282:7: note:   no known conversion for argument 1 from 'std::__cxx11::string {aka std::__cxx11::basic_string<char>}' to 'std::__cxx11::basic_string<char>::size_type {aka long unsigned int}'
/usr/include/c++/6/bits/basic_string.h:1300:9: note: candidate: template<class _InputIterator, class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::assign(_InputIterator, _InputIterator) [with _InputIterator = _InputIterator; <template-parameter-2-2> = <template-parameter-1-2>; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]
         assign(_InputIterator __first, _InputIterator __last)
         ^~~~~~
/usr/include/c++/6/bits/basic_string.h:1300:9: note:   template argument deduction/substitution failed:
/in/foo.cc:22:50: note:   deduced conflicting types for parameter '_InputIterator' ('std::__cxx11::basic_string<char>' and 'long unsigned int')
             if(pos!=T.length())t.Par.assign(T,pos);
                                                  ^
In file included from /usr/include/c++/6/string:52:0,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/basic_string.h:1310:7: note: candidate: std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::assign(std::initializer_list<_Tp>) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]
       assign(initializer_list<_CharT> __l)
       ^~~~~~
/usr/include/c++/6/bits/basic_string.h:1310:7: note:   candidate expects 1 argument, 2 provided
/in/foo.cc:28:29: error: no matching function for call to 'std::__cxx11::basic_string<char>::assign(std::__cxx11::string&, int)'
             t.Par.assign(T,1);
                             ^
In file included from /usr/include/c++/6/string:52:0,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/basic_string.h:1194:7: note: candidate: std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::assign(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]
       assign(const basic_string& __str)
       ^~~~~~
/usr/include/c++/6/bits/basic_string.h:1194:7: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/6/bits/basic_string.h:1210:7: note: candidate: std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::assign(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]
       assign(basic_string&& __str)
       ^~~~~~
/usr/include/c++/6/bits/basic_string.h:1210:7: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/6/bits/basic_string.h:1233:7: note: candidate: std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::assign(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]
       assign(const basic_string& __str, size_type __pos, size_type __n)
       ^~~~~~
/usr/include/c++/6/bits/basic_string.h:1233:7: note:   candidate expects 3 arguments, 2 provided
/usr/include/c++/6/bits/basic_string.h:1249:7: note: candidate: std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::assign(const _CharT*, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]
       assign(const _CharT* __s, size_type __n)
       ^~~~~~
/usr/include/c++/6/bits/basic_string.h:1249:7: note:   no known conversion for argument 1 from 'std::__cxx11::string {aka std::__cxx11::basic_string<char>}' to 'const char*'
/usr/include/c++/6/bits/basic_string.h:1265:7: note: candidate: std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::assign(const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]
       assign(const _CharT* __s)
       ^~~~~~
/usr/include/c++/6/b

信息

递交者
类型
递交
题目
P1305 去括号问题
语言
C++
递交时间
2024-04-05 02:11:22
评测时间
2024-04-05 02:11:22
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes