Pau*_*cks 1 c++ pointers const reference
例如,如果我有以下内容:
void foo(string* s)
{
bar(s); // this line fails to compile, invalid init. error
}
void bar(const string& cs)
{
// stuff happens here
}
Run Code Online (Sandbox Code Playgroud)
我需要进行哪些转换才能让电话成功?
| 归档时间: |
|
| 查看次数: |
7112 次 |
| 最近记录: |