【发布时间】:2009-06-17 22:04:07
【问题描述】:
例如,如果我有以下情况:
void foo(string* s)
{
bar(s); // this line fails to compile, invalid init. error
}
void bar(const string& cs)
{
// stuff happens here
}
我需要进行哪些转换才能使调用栏成功?
【问题讨论】:
标签: c++ pointers reference constants