1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
|
g++ -o First_go ./First_go.cpp -std=c++11
./First_go.cpp: In function ‘int main(int, char**)’:
./First_go.cpp:10:58: error: no matching function for call to ‘std::basic_string<char>::basic_string(san::Week&)’
std::cout<<"Today = "<<static_cast<std::string>(Today)<<std::endl ;
^
./First_go.cpp:10:58: note: candidates are:
In file included from /usr/include/c++/4.8/string:52:0,
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 ./First_go.cpp:3:
/usr/include/c++/4.8/bits/basic_string.h:532:9: note: template<class _InputIterator> std::basic_string<_CharT, _Traits, _Alloc>::basic_string(_InputIterator, _InputIterator, const _Alloc&)
basic_string(_InputIterator __beg, _InputIterator __end,
^
/usr/include/c++/4.8/bits/basic_string.h:532:9: note: template argument deduction/substitution failed:
./First_go.cpp:10:58: note: candidate expects 3 arguments, 1 provided
std::cout<<"Today = "<<static_cast<std::string>(Today)<<std::endl ;
^
In file included from /usr/include/c++/4.8/string:52:0,
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 ./First_go.cpp:3:
/usr/include/c++/4.8/bits/basic_string.h:522:7: note: std::basic_string<_CharT, _Traits, _Alloc>::basic_string(std::initializer_list<_Tp>, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char
>; _Alloc = std::allocator<char>]
basic_string(initializer_list<_CharT> __l, const _Alloc& __a = _Alloc());
^
/usr/include/c++/4.8/bits/basic_string.h:522:7: note: no known conversion for argument 1 from ‘san::Week’ to ‘std::initializer_list<char>’
/usr/include/c++/4.8/bits/basic_string.h:507:7: note: std::basic_string<_CharT, _Traits, _Alloc>::basic_string(std::basic_string<_CharT, _Traits, _Alloc>&&) [with _CharT = char; _Traits = std::char_traits<c
har>; _Alloc = std::allocator<char>]
basic_string(basic_string&& __str) noexcept
^
/usr/include/c++/4.8/bits/basic_string.h:507:7: note: no known conversion for argument 1 from ‘san::Week’ to ‘std::basic_string<char>&&’
/usr/include/c++/4.8/bits/basic_string.h:497:7: note: std::basic_string<_CharT, _Traits, _Alloc>::basic_string(std::basic_string<_CharT, _Traits, _Alloc>::size_type, _CharT, const _Alloc&) [with _CharT = ch
ar; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]
basic_string(size_type __n, _CharT __c, const _Alloc& __a = _Alloc());
^
/usr/include/c++/4.8/bits/basic_string.h:497:7: note: candidate expects 3 arguments, 1 provided
/usr/include/c++/4.8/bits/basic_string.h:490:7: note: std::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = s
td::allocator<char>]
basic_string(const _CharT* __s, const _Alloc& __a = _Alloc());
^
/usr/include/c++/4.8/bits/basic_string.h:490:7: note: no known conversion for argument 1 from ‘san::Week’ to ‘const char*’
/usr/include/c++/4.8/bits/basic_string.h:483:7: note: std::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, std::basic_string<_CharT, _Traits, _Alloc>::size_type, const _Alloc&) [with _Cha
rT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]
basic_string(const _CharT* __s, size_type __n,
^
/usr/include/c++/4.8/bits/basic_string.h:483:7: note: candidate expects 3 arguments, 1 provided
/usr/include/c++/4.8/bits/basic_string.h:471:7: note: std::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::basic_string<_CharT, _Traits, _Alloc>&, std::basic_string<_CharT, _Traits, _Alloc>::
size_type, std::basic_string<_CharT, _Traits, _Alloc>::size_type, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::basic_string<_CharT, _Traits, _All
oc>::size_type = long unsigned int]
basic_string(const basic_string& __str, size_type __pos,
^
/usr/include/c++/4.8/bits/basic_string.h:471:7: note: candidate expects 4 arguments, 1 provided
/usr/include/c++/4.8/bits/basic_string.h:462:7: note: std::basic_string<_CharT, _Traits, _Alloc>::basic_string(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 unsigned int]
basic_string(const basic_string& __str, size_type __pos,
^
/usr/include/c++/4.8/bits/basic_string.h:462:7: note: candidate expects 3 arguments, 1 provided
/usr/include/c++/4.8/bits/basic_string.h:455:7: note: std::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_tra
its<char>; _Alloc = std::allocator<char>]
basic_string(const basic_string& __str);
^
/usr/include/c++/4.8/bits/basic_string.h:455:7: note: no known conversion for argument 1 from ‘san::Week’ to ‘const std::basic_string<char>&’
/usr/include/c++/4.8/bits/basic_string.h:448:7: note: std::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<c
har>]
basic_string(const _Alloc& __a);
^
/usr/include/c++/4.8/bits/basic_string.h:448:7: note: no known conversion for argument 1 from ‘san::Week’ to ‘const std::allocator<char>&’
/usr/include/c++/4.8/bits/basic_string.h:437:7: note: std::basic_string<_CharT, _Traits, _Alloc>::basic_string() [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]
basic_string()
^
/usr/include/c++/4.8/bits/basic_string.h:437:7:
|