C++ 字符串常量传入函数的问题 || 报错:cannot bind non-const lvalue reference of type‘std::__cxx11::string&

本文探讨了C++中函数参数为字符串引用时,不能直接传递字面字符串常量的问题。当尝试将字面字符串常量传递给期望字符串引用的函数时,会导致编译错误。解决方案包括修改函数参数为常量引用、拷贝传参或接受右值引用。理解这些概念对于C++程序员来说至关重要。

1.问题描述

1.1 函数

string get_str1(string &str)
{
return str;
}

string get_str2(string str)
{
return str;
}

可以看到这两个函数唯一的差别在于传入参数一个是引用,一个是常量

1.2 主函数——没问题版

int main()
{
    string str = "hello hello";
    cout << get_str1(str) << endl;
    cout << get_str2(str) << endl;
    return 0;
}

这样是肯定没问题的

1.3 主函数——有问题版

int main()
{
    cout << get_str1("hello hello") << endl;
    cout << get_str2("hello hello") << endl;
    return 0;
}
main.cpp:58:35: error: cannot bind non-const lvalue reference of type
'std::__cxx11::string& {aka std::__cxx11::basic_string<char>&}' 
to an rvalue of type 'std::__cxx11::string {aka std::__cxx11::basic_string<char>}'

这样问题就大大的,会报错。正如报错所示,

不能将string引用const char数组“hello hello”绑定起来。也就是说,不能将字面字符串常量作为参数传递给一个需要字符串引用的函数。

2.解决方法

方法1        get_str1(string &str)改成get_str1(const string &str)

方法2        get_str1(string &str)改成get_str1(const string str)

方法3        get_str1(string &str)改成get_str1(string &&str)

方法1指明传入一个常量(和方法3基本思路一样),方法2实际上是做一次常量的拷贝作为参数传入,方法3中的&&表示传入一个右值(也就是常量引用),这三种方法都是可以的

||=== Build: Debug in 作业 (compiler: GNU GCC Compiler) ===| D:\作业\main.cpp|20|error: 'getFirst' declared as function returning a function| D:\作业\main.cpp|24|error: 'getSecond' declared as function returning a function| D:\作业\main.cpp||In function 'int main()':| D:\作业\main.cpp|33|error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'const char [2]')| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\istream|168|note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>]' <near match>| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\istream|168|note: conversion of argument 1 would be ill-formed:| D:\作业\main.cpp|33|error: cannot bind non-const lvalue reference of type 'bool&' to an rvalue of type 'bool'| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\istream|172|note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]' <near match>| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\istream|172|note: conversion of argument 1 would be ill-formed:| D:\作业\main.cpp|33|error: invalid conversion from 'const char*' to 'short int' [-fpermissive]| D:\作业\main.cpp|33|error: cannot bind rvalue '(short int)((const char*)"(")' to 'short int&'| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\istream|175|note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>]' <near match>| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\istream|175|note: conversion of argument 1 would be ill-formed:| D:\作业\main.cpp|33|error: invalid conversion from 'const char*' to 'short unsigned int' [-fpermissive]| D:\作业\main.cpp|33|error: cannot bind rvalue '(short unsigned int)((const char*)"(")' to 'short unsigned int&'| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\istream|179|note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char; _Traits = std::char_traits<char>]' <near match>| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\istream|179|note: conversion of argument 1 would be ill-formed:| D:\作业\main.cpp|33|error: invalid conversion from 'const char*' to 'int' [-fpermissive]| D:\作业\main.cpp|33|error: cannot bind rvalue '(int)((const char*)"(")' to 'int&'| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\istream|182|note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>]' <near match>| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\istream|182|note: conversion of argument 1 would be ill-formed:| D:\作业\main.cpp|33|error: invalid conversion from 'const char*' to 'unsigned int' [-fpermissive]| D:\作业\main.cpp|33|error: cannot bind rvalue '(unsigned int)((const char*)"(")' to 'unsigned int&'| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\istream|186|note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>]' <near match>| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\istream|186|note: conversion of argument 1 would be ill-formed:| D:\作业\main.cpp|33|error: invalid conversion from 'const char*' to 'long int' [-fpermissive]| D:\作业\main.cpp|33|error: cannot bind rvalue '(long int)((const char*)"(")' to 'long int&'| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\istream|190|note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>]' <near match>| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\istream|190|note: conversion of argument 1 would be ill-formed:| D:\作业\main.cpp|33|error: invalid conversion from 'const char*' to 'long unsigned int' [-fpermissive]| D:\作业\main.cpp|33|error: cannot bind rvalue '(long unsigned int)((const char*)"(")' to 'long unsigned int&'| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\istream|195|note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>]' <near match>| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\istream|195|note: conversion of argument 1 would be ill-formed:| D:\作业\main.cpp|33|error: invalid conversion from 'const char*' to 'long long int' [-fpermissive]| D:\作业\main.cpp|33|error: cannot bind rvalue '(long long int)((const char*)"(")' to 'long long int&'| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\istream|199|note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>]' <near match>| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\istream|199|note: conversion of argument 1 would be ill-formed:| D:\作业\main.cpp|33|error: invalid conversion from 'const char*' to 'long long unsigned int' [-fpermissive]| D:\作业\main.cpp|33|error: cannot bind rvalue '(long long unsigned int)((const char*)"(")' to 'long long unsigned int&'| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\istream|235|note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(void*&) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>]' <near match>| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\istream|235|note: conversion of argument 1 would be ill-formed:| D:\作业\main.cpp|33|error: invalid conversion from 'const void*' to 'void*' [-fpermissive]| D:\作业\main.cpp|33|error: cannot bind rvalue '(void*)((const void*)((const char*)"("))' to 'void*&'| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\istream|120|note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::basic_istream<_CharT, _Traits>::__istream_type& (*)(std::basic_istream<_CharT, _Traits>::__istream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>]'| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\istream|120|note: no known conversion for argument 1 from 'const char [2]' to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_istream<char>& (*)(std::basic_istream<char>&)'}| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\istream|124|note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::basic_istream<_CharT, _Traits>::__ios_type& (*)(std::basic_istream<_CharT, _Traits>::__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>; std::basic_istream<_CharT, _Traits>::__ios_type = std::basic_ios<char>]'| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\istream|124|note: no known conversion for argument 1 from 'const char [2]' to 'std::basic_istream<char>::__ios_type& (*)(std::basic_istream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'}| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\istream|131|note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>]'| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\istream|131|note: no known conversion for argument 1 from 'const char [2]' to 'std::ios_base& (*)(std::ios_base&)'| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\istream|214|note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(float&) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>]'| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\istream|214|note: no known conversion for argument 1 from 'const char [2]' to 'float&'| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\istream|218|note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(double&) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>]'| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\istream|218|note: no known conversion for argument 1 from 'const char [2]' to 'double&'| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\istream|222|note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long double&) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>]'| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\istream|222|note: no known conversion for argument 1 from 'const char [2]' to 'long double&'| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\istream|259|note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(std::basic_istream<_CharT, _Traits>::__streambuf_type*) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__streambuf_type = std::basic_streambuf<char>]'| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\istream|259|note: no known conversion for argument 1 from 'const char [2]' to 'std::basic_istream<char>::__streambuf_type*' {aka 'std::basic_streambuf<char>*'}| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\bits\basic_string.tcc|1465|note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&, std::__cxx11::basic_string&lt;_CharT, _Traits, _Alloc>&)'| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\bits\basic_string.tcc|1465|note: template argument deduction/substitution failed:| D:\作业\main.cpp|33|note: mismatched types 'std::__cxx11::basic_string&lt;_CharT, _Traits, _Alloc>' and 'const char [2]'| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\bits\istream.tcc|931|note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&, _CharT&)'| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\bits\istream.tcc|931|note: template argument deduction/substitution failed:| D:\作业\main.cpp|33|note: deduced conflicting types for parameter '_CharT' ('char' and 'const char [2]')| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\istream|756|note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(std::basic_istream<char, _Traits>&, unsigned char&)'| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\istream|756|note: template argument deduction/substitution failed:| D:\作业\main.cpp|33|note: cannot convert '"("' (type 'const char [2]') to type 'unsigned char&'| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\istream|761|note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(std::basic_istream<char, _Traits>&, signed char&)'| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\istream|761|note: template argument deduction/substitution failed:| D:\作业\main.cpp|33|note: cannot convert '"("' (type 'const char [2]') to type 'signed char&'| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\bits\istream.tcc|963|note: candidate: 'template<class _CharT2, class _Traits2> std::basic_istream<_CharT, _Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&, _CharT2*)'| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\bits\istream.tcc|963|note: template argument deduction/substitution failed:| D:\作业\main.cpp|33|note: deduced conflicting types for parameter '_CharT2' ('char' and 'const char')| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\istream|803|note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(std::basic_istream<char, _Traits>&, unsigned char*)'| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\istream|803|note: template argument deduction/substitution failed:| D:\作业\main.cpp|33|note: cannot convert '"("' (type 'const char [2]') to type 'unsigned char*'| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\istream|808|note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(std::basic_istream<char, _Traits>&, signed char*)'| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\istream|808|note: template argument deduction/substitution failed:| D:\作业\main.cpp|33|note: cannot convert '"("' (type 'const char [2]') to type 'signed char*'| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\istream|980|note: candidate: 'template<class _Istream, class _Tp> typename std::enable_if<std::__and_<std::__not_<std::is_lvalue_reference<_Tp> >, std::__is_convertible_to_basic_istream<_Istream>, std::__is_extractable<typename std::__is_convertible_to_basic_istream<_Tp>::__istream_type, _Tp&&, void> >::value, typename std::__is_convertible_to_basic_istream<_Tp>::__istream_type>::type std::operator>>(_Istream&&, _Tp&&)'| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\istream|980|note: template argument deduction/substitution failed:| D:\作业\main.cpp|33|required from here| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\istream|980|error: no type named 'type' in 'struct std::enable_if<false, std::basic_istream<char>&>'| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\iomanip|71|note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&, std::_Resetiosflags)'| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\iomanip|71|note: template argument deduction/substitution failed:| D:\作业\main.cpp|33|note: cannot convert '"("' (type 'const char [2]') to type 'std::_Resetiosflags'| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\iomanip|101|note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&, std::_Setiosflags)'| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\iomanip|101|note: template argument deduction/substitution failed:| D:\作业\main.cpp|33|note: cannot convert '"("' (type 'const char [2]') to type 'std::_Setiosflags'| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\iomanip|132|note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&, std::_Setbase)'| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\iomanip|132|note: template argument deduction/substitution failed:| D:\作业\main.cpp|33|note: cannot convert '"("' (type 'const char [2]') to type 'std::_Setbase'| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\iomanip|170|note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&, std::_Setfill<_CharT>)'| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\iomanip|170|note: template argument deduction/substitution failed:| D:\作业\main.cpp|33|note: mismatched types 'std::_Setfill<_CharT>' and 'const char*'| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\iomanip|200|note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&, std::_Setprecision)'| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\iomanip|200|note: template argument deduction/substitution failed:| D:\作业\main.cpp|33|note: cannot convert '"("' (type 'const char [2]') to type 'std::_Setprecision'| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\iomanip|230|note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&, std::_Setw)'| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\iomanip|230|note: template argument deduction/substitution failed:| D:\作业\main.cpp|33|note: cannot convert '"("' (type 'const char [2]') to type 'std::_Setw'| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\iomanip|264|note: candidate: 'template<class _CharT, class _Traits, class _MoneyT> std::basic_istream<_CharT, _Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&, std::_Get_money<_MoneyT>)'| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\iomanip|264|note: template argument deduction/substitution failed:| D:\作业\main.cpp|33|note: mismatched types 'std::_Get_money<_MoneyT>' and 'const char*'| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\iomanip|418|note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&, std::_Get_time<_CharT>)'| C:\Program Files\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c++\iomanip|418|note: template argument deduction/substitution failed:| D:\作业\main.cpp|33|note: mismatched types 'std::_Get_time<_CharT>' and 'const char*'| D:\作业\main.cpp|34|error: missing template arguments before 'p'| D:\作业\main.cpp|35|error: 'p' was not declared in this scope| ||=== Build failed: 25 error(s), 1 warning(s) (0 minute(s), 0 second(s)) ===|
06-10
a.cpp: In function ‘int main()’: a.cpp:9:14: error: no match for ‘operator>>’ (operand types are ‘std::istream’ {akastd::basic_istream<char>’} and ‘char*’) 9 | std::cin >> (s + 1); // 这里确保输入到s数组的第二个位置开始 | ~~~~~~~~ ^~ ~~~~~~~ | | | | | char* | std::istream {aka std::basic_istream<char>} In file included from /usr/include/c++/11/iostream:40, from a.cpp:1: /usr/include/c++/11/istream:168:7: note: candidate:std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>]’ (near match) 168 | operator>>(bool& __n) | ^~~~~~~~ /usr/include/c++/11/istream:168:7: note: conversion of argument 1 would be ill-formed: a.cpp:9:20: error: cannot bind non-const lvalue reference of type ‘bool&’ to a value of type ‘char*’ 9 | std::cin >> (s + 1); // 这里确保输入到s数组的第二个位置开始 | ~~~^~~~ In file included from /usr/include/c++/11/iostream:40, from a.cpp:1: /usr/include/c++/11/istream:172:7: note: candidate:std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]’ (near match) 172 | operator>>(short& __n); | ^~~~~~~~ /usr/include/c++/11/istream:172:7: note: conversion of argument 1 would be ill-formed: a.cpp:9:20: error: invalid conversion from ‘char*’ to ‘short int’ [-fpermissive] 9 | std::cin >> (s + 1); // 这里确保输入到s数组的第二个位置开始 | ~~~^~~~ | | | char* a.cpp:9:20: error: cannot bind rvalue ‘(short int)(((char*)(& s)) + 1)’ to ‘short int&’ In file included from /usr/include/c++/11/iostream:40, from a.cpp:1: /usr/include/c++/11/istream:175:7: note: candidate:std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>]’ (near match) 175 | operator>>(unsigned short& __n) | ^~~~~~~~ /usr/include/c++/11/istream:175:7: note: conversion of argument 1 would be ill-formed: a.cpp:9:20: error: invalid conversion from ‘char*’ to ‘short unsigned int’ [-fpermissive] 9 | std::cin >> (s + 1); // 这里确保输入到s数组的第二个位置开始 | ~~~^~~~ | | | char* a.cpp:9:20: error: cannot bind rvalue ‘(short unsigned int)(((char*)(& s)) + 1)’ to ‘short unsigned int&’ In file included from /usr/include/c++/11/iostream:40, from a.cpp:1: /usr/include/c++/11/istream:179:7: note: candidate:std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char; _Traits = std::char_traits<char>]’ (near match) 179 | operator>>(int& __n); | ^~~~~~~~ /usr/include/c++/11/istream:179:7: note: conversion of argument 1 would be ill-formed: a.cpp:9:20: error: invalid conversion from ‘char*’ to ‘int’ [-fpermissive] 9 | std::cin >> (s + 1); // 这里确保输入到s数组的第二个位置开始 | ~~~^~~~ | | | char* a.cpp:9:20: error: cannot bind rvalue ‘(int)(((char*)(& s)) + 1)’ to ‘int&’ In file included from /usr/include/c++/11/iostream:40, from a.cpp:1: /usr/include/c++/11/istream:182:7: note: candidate:std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>]’ (near match) 182 | operator>>(unsigned int& __n) | ^~~~~~~~ /usr/include/c++/11/istream:182:7: note: conversion of argument 1 would be ill-formed: a.cpp:9:20: error: invalid conversion from ‘char*’ to ‘unsigned int’ [-fpermissive] 9 | std::cin >> (s + 1); // 这里确保输入到s数组的第二个位置开始 | ~~~^~~~ | | | char* a.cpp:9:20: error: cannot bind rvalue ‘(unsigned int)(((char*)(& s)) + 1)’ to ‘unsigned int&’ In file included from /usr/include/c++/11/iostream:40, from a.cpp:1: /usr/include/c++/11/istream:186:7: note: candidate:std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>]’ (near match) 186 | operator>>(long& __n) | ^~~~~~~~ /usr/include/c++/11/istream:186:7: note: conversion of argument 1 would be ill-formed: a.cpp:9:20: error: invalid conversion from ‘char*’ to ‘long int’ [-fpermissive] 9 | std::cin >> (s + 1); // 这里确保输入到s数组的第二个位置开始 | ~~~^~~~ | | | char* a.cpp:9:20: error: cannot bind rvalue ‘(long int)(((char*)(& s)) + 1)’ to ‘long int&’ In file included from /usr/include/c++/11/iostream:40, from a.cpp:1: /usr/include/c++/11/istream:190:7: note: candidate:std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>]’ (near match) 190 | operator>>(unsigned long& __n) | ^~~~~~~~ /usr/include/c++/11/istream:190:7: note: conversion of argument 1 would be ill-formed: a.cpp:9:20: error: invalid conversion from ‘char*’ to ‘long unsigned int’ [-fpermissive] 9 | std::cin >> (s + 1); // 这里确保输入到s数组的第二个位置开始 | ~~~^~~~ | | | char* a.cpp:9:20: error: cannot bind rvalue ‘(long unsigned int)(((char*)(& s)) + 1)’ to ‘long unsigned int&’ In file included from /usr/include/c++/11/iostream:40, from a.cpp:1: /usr/include/c++/11/istream:195:7: note: candidate:std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>]’ (near match) 195 | operator>>(long long& __n) | ^~~~~~~~ /usr/include/c++/11/istream:195:7: note: conversion of argument 1 would be ill-formed: a.cpp:9:20: error: invalid conversion from ‘char*’ to ‘long long int’ [-fpermissive] 9 | std::cin >> (s + 1); // 这里确保输入到s数组的第二个位置开始 | ~~~^~~~ | | | char* a.cpp:9:20: error: cannot bind rvalue ‘(long long int)(((char*)(& s)) + 1)’ to ‘long long int&’ In file included from /usr/include/c++/11/iostream:40, from a.cpp:1: /usr/include/c++/11/istream:199:7: note: candidate:std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>]’ (near match) 199 | operator>>(unsigned long long& __n) | ^~~~~~~~ /usr/include/c++/11/istream:199:7: note: conversion of argument 1 would be ill-formed: a.cpp:9:20: error: invalid conversion from ‘char*’ to ‘long long unsigned int’ [-fpermissive] 9 | std::cin >> (s + 1); // 这里确保输入到s数组的第二个位置开始 | ~~~^~~~ | | | char* a.cpp:9:20: error: cannot bind rvalue ‘(long long unsigned int)(((char*)(& s)) + 1)’ to ‘long long unsigned int&’ In file included from /usr/include/c++/11/iostream:40, from a.cpp:1: /usr/include/c++/11/istream:235:7: note: candidate:std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(void*&) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>]’ (near match) 235 | operator>>(void*& __p) | ^~~~~~~~ /usr/include/c++/11/istream:235:7: note: conversion of argument 1 would be ill-formed: a.cpp:9:20: error: cannot bind non-const lvalue reference of type ‘void*&’ to an rvalue of type ‘void*’ 9 | std::cin >> (s + 1); // 这里确保输入到s数组的第二个位置开始 | ~~~^~~~ In file included from /usr/include/c++/11/iostream:40, from a.cpp:1: /usr/include/c++/11/istream:120:7: note: candidate:std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::basic_istream<_CharT, _Traits>::__istream_type& (*)(std::basic_istream<_CharT, _Traits>::__istream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>]’ 120 | operator>>(__istream_type& (*__pf)(__istream_type&)) | ^~~~~~~~ /usr/include/c++/11/istream:120:36: note: no known conversion for argument 1 from ‘char*’ to ‘std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)’ {akastd::basic_istream<char>& (*)(std::basic_istream<char>&)’} 120 | operator>>(__istream_type& (*__pf)(__istream_type&)) | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/11/istream:124:7: note: candidate:std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::basic_istream<_CharT, _Traits>::__ios_type& (*)(std::basic_istream<_CharT, _Traits>::__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>; std::basic_istream<_CharT, _Traits>::__ios_type = std::basic_ios<char>]’ 124 | operator>>(__ios_type& (*__pf)(__ios_type&)) | ^~~~~~~~ /usr/include/c++/11/istream:124:32: note: no known conversion for argument 1 from ‘char*’ to ‘std::basic_istream<char>::__ios_type& (*)(std::basic_istream<char>::__ios_type&)’ {akastd::basic_ios<char>& (*)(std::basic_ios<char>&)’} 124 | operator>>(__ios_type& (*__pf)(__ios_type&)) | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ /usr/include/c++/11/istream:131:7: note: candidate:std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>]’ 131 | operator>>(ios_base& (*__pf)(ios_base&)) | ^~~~~~~~ /usr/include/c++/11/istream:131:30: note: no known conversion for argument 1 from ‘char*’ to ‘std::ios_base& (*)(std::ios_base&)’ 131 | operator>>(ios_base& (*__pf)(ios_base&)) | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~ /usr/include/c++/11/istream:214:7: note: candidate:std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(float&) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>]’ 214 | operator>>(float& __f) | ^~~~~~~~ /usr/include/c++/11/istream:214:25: note: no known conversion for argument 1 from ‘char*’ to ‘float&’ 214 | operator>>(float& __f) | ~~~~~~~^~~ /usr/include/c++/11/istream:218:7: note: candidate:std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(double&) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>]’ 218 | operator>>(double& __f) | ^~~~~~~~ /usr/include/c++/11/istream:218:26: note: no known conversion for argument 1 from ‘char*’ to ‘double&’ 218 | operator>>(double& __f) | ~~~~~~~~^~~ /usr/include/c++/11/istream:222:7: note: candidate:std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long double&) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>]’ 222 | operator>>(long double& __f) | ^~~~~~~~ /usr/include/c++/11/istream:222:31: note: no known conversion for argument 1 from ‘char*’ to ‘long double&’ 222 | operator>>(long double& __f) | ~~~~~~~~~~~~~^~~ /usr/include/c++/11/istream:259:7: note: candidate:std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(std::basic_istream<_CharT, _Traits>::__streambuf_type*) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__streambuf_type = std::basic_streambuf<char>]’ 259 | operator>>(__streambuf_type* __sb); | ^~~~~~~~ /usr/include/c++/11/istream:259:36: note: no known conversion for argument 1 from ‘char*’ to ‘std::basic_istream<char>::__streambuf_type*’ {akastd::basic_streambuf<char>*’} 259 | operator>>(__streambuf_type* __sb); | ~~~~~~~~~~~~~~~~~~^~~~ In file included from /usr/include/c++/11/string:56, from /usr/include/c++/11/bits/locale_classes.h:40, from /usr/include/c++/11/bits/ios_base.h:41, from /usr/include/c++/11/ios:42, from /usr/include/c++/11/ostream:38, from /usr/include/c++/11/iostream:39, from a.cpp:1: /usr/include/c++/11/bits/basic_string.tcc:1485:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&, std::__cxx11::basic_string&lt;_CharT, _Traits, _Allocator>&)’ 1485 | operator>>(basic_istream<_CharT, _Traits>& __in, | ^~~~~~~~ /usr/include/c++/11/bits/basic_string.tcc:1485:5: note: template argument deduction/substitution failed: a.cpp:9:23: note: mismatched types ‘std::__cxx11::basic_string&lt;_CharT, _Traits, _Allocator>’ and ‘char*’ 9 | std::cin >> (s + 1); // 这里确保输入到s数组的第二个位置开始 | ^ In file included from /usr/include/c++/11/istream:1016, from /usr/include/c++/11/iostream:40, from a.cpp:1: /usr/include/c++/11/bits/istream.tcc:958:5: note: candidate: ‘template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&, _CharT&)’ 958 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c) | ^~~~~~~~ /usr/include/c++/11/bits/istream.tcc:958:5: note: template argument deduction/substitution failed: a.cpp:9:23: note: deduced conflicting types for parameter ‘_CharT’ (‘char’ and ‘char*’) 9 | std::cin >> (s + 1); // 这里确保输入到s数组的第二个位置开始 | ^ In file included from /usr/include/c++/11/iostream:40, from a.cpp:1: /usr/include/c++/11/istream:756:5: note: candidate: ‘template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(std::basic_istream<char, _Traits>&, unsigned char&)’ 756 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c) | ^~~~~~~~ /usr/include/c++/11/istream:756:5: note: template argument deduction/substitution failed: a.cpp:9:20: note: cannot convert ‘(((char*)(& s)) + 1)’ (type ‘char*’) to type ‘unsigned char&’ 9 | std::cin >> (s + 1); // 这里确保输入到s数组的第二个位置开始 | ~~~^~~~ In file included from /usr/include/c++/11/iostream:40, from a.cpp:1: /usr/include/c++/11/istream:761:5: note: candidate: ‘template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(std::basic_istream<char, _Traits>&, signed char&)’ 761 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c) | ^~~~~~~~ /usr/include/c++/11/istream:761:5: note: template argument deduction/substitution failed: a.cpp:9:20: note: cannot convert ‘(((char*)(& s)) + 1)’ (type ‘char*’) to type ‘signed char&’ 9 | std::cin >> (s + 1); // 这里确保输入到s数组的第二个位置开始 | ~~~^~~~ In file included from /usr/include/c++/11/iostream:40, from a.cpp:1: /usr/include/c++/11/istream:859:5: note: candidate: ‘template<class _CharT, class _Traits, long unsigned int _Num> std::basic_istream<_CharT, _Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&, _CharT (&)[_Num])’ 859 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT (&__s)[_Num]) | ^~~~~~~~ /usr/include/c++/11/istream:859:5: note: template argument deduction/substitution failed: a.cpp:9:23: note: mismatched types ‘_CharT [_Num]’ and ‘char*’ 9 | std::cin >> (s + 1); // 这里确保输入到s数组的第二个位置开始 | ^ In file included from /usr/include/c++/11/iostream:40, from a.cpp:1: /usr/include/c++/11/istream:868:5: note: candidate: ‘template<class _Traits, long unsigned int _Num> std::basic_istream<char, _Traits>& std::operator>>(std::basic_istream<char, _Traits>&, unsigned char (&)[_Num])’ 868 | operator>>(basic_istream<char, _Traits>& __in, unsigned char (&__s)[_Num]) | ^~~~~~~~ /usr/include/c++/11/istream:868:5: note: template argument deduction/substitution failed: a.cpp:9:23: note: mismatched types ‘unsigned char [_Num]’ and ‘char*’ 9 | std::cin >> (s + 1); // 这里确保输入到s数组的第二个位置开始 | ^ In file included from /usr/include/c++/11/iostream:40, from a.cpp:1: /usr/include/c++/11/istream:873:5: note: candidate: ‘template<class _Traits, long unsigned int _Num> std::basic_istream<char, _Traits>& std::operator>>(std::basic_istream<char, _Traits>&, signed char (&)[_Num])’ 873 | operator>>(basic_istream<char, _Traits>& __in, signed char (&__s)[_Num]) | ^~~~~~~~ /usr/include/c++/11/istream:873:5: note: template argument deduction/substitution failed: a.cpp:9:23: note: mismatched types ‘signed char [_Num]’ and ‘char*’ 9 | std::cin >> (s + 1); // 这里确保输入到s数组的第二个位置开始 | ^ In file included from /usr/include/c++/11/iostream:40, from a.cpp:1: /usr/include/c++/11/istream:1006:5: note: candidate: ‘template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)’ 1006 | operator>>(_Istream&& __is, _Tp&& __x) | ^~~~~~~~ /usr/include/c++/11/istream:1006:5: note: template argument deduction/substitution failed: /usr/include/c++/11/istream: In substitution of ‘template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_istream<char>&; _Tp = char*]’: a.cpp:9:23: required from here /usr/include/c++/11/istream:1006:5: error: template constraint failure for ‘template<class _Is, class _Tp> requires (__derived_from_ios_base<_Is>) && requires(_Is& __is, _Tp&& __t) {__is >> (forward<_Tp>)(__t);} using __rvalue_stream_extraction_t = _Is&&’ /usr/include/c++/11/istream:1006:5: note: constraints not satisfied In file included from /usr/include/c++/11/iostream:39, from a.cpp:1: /usr/include/c++/11/ostream: In substitution of ‘template<class _Is, class _Tp> requires (__derived_from_ios_base<_Is>) && requires(_Is& __is, _Tp&& __t) {__is >> (forward<_Tp>)(__t);} using __rvalue_stream_extraction_t = _Is&& [with _Is = std::basic_istream<char>&; _Tp = char*]’: /usr/include/c++/11/istream:1006:5: required by substitution of ‘template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_istream<char>&; _Tp = char*]’ a.cpp:9:23: required from here /usr/include/c++/11/ostream:717:13: required for the satisfaction of ‘__derived_from_ios_base<_Is>’ [with _Is = std::basic_istream<char, std::char_traits<char> >&] /usr/include/c++/11/ostream:717:39: note: the expression ‘is_class_v<_Tp> [with _Tp = std::basic_istream<char, std::char_traits<char> >&]’ evaluated to ‘false’ 717 | concept __derived_from_ios_base = is_class_v<_Tp> | ^~~~~~~~~~~~~~~
最新发布
12-06
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

做一瓶独立的花露水

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值