F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_35287045_6193.cpp: In function 'int main()':
0_0_35287045_6193.cpp:45:23: error: no matching function for call to 'std::basic_string<char>::assign(std::string&, int)'
         b.assign(a,i+1);
                       ^
0_0_35287045_6193.cpp:45:23: note: candidates are:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/string:52:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/locale_classes.h:40,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/ios_base.h:41,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ios:42,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ostream:38,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/iostream:39,
                 from 0_0_35287045_6193.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/basic_string.h:1084:7: note: std::basic_string<_CharT, _Traits, _Alloc>& std::basic_string<_CharT, _Traits, _Alloc>::assign(const std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]
       assign(const basic_string& __str);
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/basic_string.h:1084:7: note:   candidate expects 1 argument, 2 provided
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/basic_string.h:1097:7: note: std::basic_string<_CharT, _Traits, _Alloc>& std::basic_string<_CharT, _Traits, _Alloc>::assign(std::basic_string<_CharT, _Traits, _Alloc>&&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]
       assign(basic_string&& __str)
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/basic_string.h:1097:7: note:   candidate expects 1 argument, 2 provided
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/basic_string.h:1118:7: note: std::basic_string<_CharT, _Traits, _Alloc>& std::basic_string<_CharT, _Traits, _Alloc>::assign(const std::basic_string<_CharT, _Traits, _Alloc>&, std::basic_string<_CharT, _Traits, _Alloc>::size_type, std::basic_string<_CharT, _Traits, _Alloc>::size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::basic_string<_CharT, _Traits, _Alloc>::size_type = long long unsigned int]
       assign(const basic_string& __str, size_type __pos, size_type __n)
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/basic_string.h:1118:7: note:   candidate expects 3 arguments, 2 provided
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/basic_string.h:1134:7: note: std::basic_string<_CharT, _Traits, _Alloc>& std::basic_string<_CharT, _Traits, _Alloc>::assign(const _CharT*, std::basic_string<_CharT, _Traits, _Alloc>::size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::basic_string<_CharT, _Traits, _Alloc>::size_type = long long unsigned int]
       assign(const _CharT* __s, size_type __n);
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/basic_string.h:1134:7: note:   no known conversion for argument 1 from 'std::string {aka std::basic_string<char>}' to 'const char*'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/basic_string.h:1146:7: note: std::basic_string<_CharT, _Traits, _Alloc>& std::basic_string<_CharT, _Traits, _Alloc>::assign(const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]
       assign(const _CharT* __s)
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/basic_string.h:1146:7: note:   candidate expects 1 argument, 2 provided
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/basic_string.h:1162:7: note: std::basic_string<_CharT, _Traits, _Alloc>& std::basic_string<_CharT, _Traits, _Alloc>::assign(std::basic_string<_CharT, _Traits, _Alloc>::size_type, _CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::basic_string<_CharT, _Traits, _Alloc>::size_type = long long unsigned int]
       assign(size_type __n, _CharT __c)
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/basic_string.h:1162:7: note:   no known conversion for argument 1 from 'std::string {aka std::basic_string<char>}' to 'std::basic_string<char>::size_type {aka long long unsigned int}'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/basic_string.h:1175:9: note: template<class _InputIterator> std::basic_string<_CharT, _Traits, _Alloc>& std::basic_string<_CharT, _Traits, _Alloc>::assign(_InputIterator, _InputIterator) [with _InputIterator = _InputIterator; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]
         assign(_InputIterator __first, _InputIterator __last)
         ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/basic_string.h:1175:9: note:   template argument deduction/substitution failed:
0_0_35287045_6193.cpp:45:23: note:   deduced conflicting types for parameter '_InputIterator' ('std::basic_string<char>' and 'int')
         b.assign(a,i+1);
                       ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/string:52:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/locale_classes.h:40,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/ios_base.h:41,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ios:42,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ostream:38,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/iostream:39,
                 from 0_0_35287045_6193.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/basic_string.h:1185:7: note: std::basic_string<_CharT, _Traits, _Alloc>& std::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)
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/basic_string.h:1185:7: note:   candidate expects 1 argument, 2 provided
0_0_35287045_6193.cpp:50:37: error: no matching function for call to 'std::basic_string<char>::assign(std::string&, int)'
                 xunhuan.assign(b,k+1);
                                     ^
0_0_35287045_6193.cpp:50:37: note: candidates are:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/string:52:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/locale_classes.h:40,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/ios_base.h:41,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ios:42,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ostream:38,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/iostream:39,
                 from 0_0_35287045_6193.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/basic_string.h:1084:7: note: std::basic_string<_CharT, _Traits, _Alloc>& std::basic_string<_CharT, _Traits, _Alloc>::assign(const std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]
       assign(const basic_string& __str);
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/basic_string.h:1084:7: note:   candidate expects 1 argument, 2 provided
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/basic_string.h:1097:7: note: std::basic_string<_CharT, _Traits, _Alloc>& std::basic_string<_CharT, _Traits, _Alloc>::assign(std::basic_string<_CharT, _Traits, _Alloc>&&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]
       assign(basic_string&& __str)
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/basic_string.h:1097:7: note:   candidate expects 1 argument, 2 provided
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/basic_string.h:1118:7: note: std::basic_string<_CharT, _Traits, _Alloc>& std::basic_string<_CharT, _Traits, _Alloc>::assign(const std::basic_string<_CharT, _Traits, _Alloc>&, std::basic_string<_CharT, _Traits, _Alloc>::size_type, std::basic_string<_CharT, _Traits, _Alloc>::size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::basic_string<_CharT, _Traits, _Alloc>::size_type = long long unsigned int]
       assign(const basic_string& __str, size_type __pos, size_type __n)
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/basic_string.h:1118:7: note:   candidate expects 3 arguments, 2 provided
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/basic_string.h:1134:7: note: std::basic_string<_CharT, _Traits, _Alloc>& std::basic_string<_CharT, _Traits, _Alloc>::assign(const _CharT*, std::basic_string<_CharT, _Traits, _Alloc>::size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::basic_string<_CharT, _Traits, _Alloc>::size_type = long long unsigned int]
       assign(const _CharT* __s, size_type __n);
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/basic_string.h:1134:7: note:   no known conversion for argument 1 from 'std::string {aka std::basic_string<char>}' to 'const char*'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/basic_string.h:1146:7: note: std::basic_string<_CharT, _Traits, _Alloc>& std::basic_string<_CharT, _Traits, _Alloc>::assign(const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]
       assign(const _CharT* __s)
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/basic_string.h:1146:7: note:   candidate expects 1 argument, 2 provided
D:/HDOJ/Co


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-25 13:29:09, Gzip enabled