如果由于某种原因想要停止/取消尚未启动的批处理查询作业(Status.State ="PENDING"),是否可以这样做?(使用的库:net Google.Apis.Bigquery.v2.1.5.0.122-beta).
我在 Visual Studio 2019 16.11.8 中使用本机 C++。我不明白这一点:false关键字可以用作 NULL (或 nullptr)吗?测试代码如下:
bool test(bool* pb)
{
if (NULL != pb)
return *pb;
else
return false;
}
void main()
{
test(false); // compiles (not what I was expecting)
test(true); // won't compile: error C2664: 'test' : cannot convert parameter 1 from 'bool' to 'bool *'
}
Run Code Online (Sandbox Code Playgroud)
我尝试过在线编译工具,但他们不接受
test(false);
Run Code Online (Sandbox Code Playgroud)
线,这对我来说听起来正常的行为应该是什么。
此外,此行为可能会导致重载方法出现问题。即,您有一个 test(bool* pb) 方法和一个带有指针的重载版本: test(int* pv)
bool test(bool* pb)
{
if (NULL != pb)
return *pb;
else
return false;
}
bool test(int* …Run Code Online (Sandbox Code Playgroud)