Попытка запустить это: < /p>
// appending to string
#include
#include
int
main()
{
std::string str;
std::string str2 = "Writing ";
std::string str3 = "print 10 and then 5 more";
// used in the same order as described above:
str.append(str2); // "Writing "
str.append(str3, 6, 3); // "10 "
str.append("dots are cool", 5); // "dots "
str.append("here: "); // "here: "
str.append(10u, '.'); // ".........."
str.append(str3.begin() + 8, str3.end()); // " and then 5 more"
str.append(5, 0x2E); // "....."
std::cout
Ошибка: без сопоставления функции для вызова к 'std :: __ cxx11 :: basic_string :: append (int, int)' < /p>
Использование кода VS 1.43.1, работая на Ubuntu 19.10, GCC версия 9.2.1 20191008 (Ubuntu 9.2.1-9ubuntu2). < /p>
Я попытался запустить код на коде :: blocks 16.01 IDE и Window была такая же ошибка.
Подробнее здесь: https://stackoverflow.com/questions/607 ... tringchara
Ошибка C ++: нет совпадения функции для вызова ‘std :: __ cxx11 :: basic_string :: append (int, int)’ ⇐ C++
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение