ggplot2当我使用该选项绘制 x 坐标从零开始的数据时scale_x_sqrt,绘图从 x 轴上的 1 而不是零开始。如果我添加,limits=c(-0.1, 100)我会收到“NaNs generated”的错误。如何让 ggplot2 包含零?
如果函数具有非void返回值并且我使用该.join函数将其连接,那么有没有办法检索它的返回值?
这是一个简化的例子:
float myfunc(int k)
{
return exp(k);
}
int main()
{
std::thread th=std::thread(myfunc, 10);
th.join();
//Where is the return value?
}
Run Code Online (Sandbox Code Playgroud)