小编Joh*_*n.M的帖子

默认字符串参数

myPreciousFunction(std::string s1 = "", std::string s2 = "")
{
}

int main()
{
    myPreciousFunction();
}
Run Code Online (Sandbox Code Playgroud)

我能让这些论点看起来更漂亮吗?如果没有提供参数,我希望有空字符串.

c++

2
推荐指数
3
解决办法
3万
查看次数

标签 统计

c++ ×1