- 博客(1)
- 收藏
- 关注
原创 关于C++的cannot bind non-const lvalue reference of type...问题
关于C++的cannot bind non-const lvalue reference of type…问题先看下面的代码,一个很简单的切分字符串并输出的函数。#include <iostream>using namespace std;void test(string& str){ cout<<str;}int main(){ string str = "aabcde"; test(str.substr(0,3)); }但当运行的时候会出
2022-01-28 00:29:06 5552
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人