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_27803953_29926.cpp: In function 'int main()':
0_0_27803953_29926.cpp:24:18: error: no matching function for call to 'std::basic_string<char>::assign(std::string&, int&)'
    x.assign(m, s1);
                  ^
0_0_27803953_29926.cpp:24:18: 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_27803953_29926.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_27803953_29926.cpp:24:18: note:   deduced conflicting types for parameter '_InputIterator' ('std::basic_string<char>' and 'int')
    x.assign(m, s1);
                  ^
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_27803953_29926.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_27803953_29926.cpp:29:18: error: no matching function for call to 'std::basic_string<char>::assign(std::string&, int&)'
    x.assign(m, s1);
                  ^
0_0_27803953_29926.cpp:29:18: 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_27803953_29926.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++/


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-19 00:22:41, Gzip enabled