#include <cassert>
#include <string>
struct AStruct
{
int x;
char* y;
int z;
};
int main()
{
AStruct structu = {4, "Hello World"};
assert(structu.z == ???);
}
Run Code Online (Sandbox Code Playgroud)
我应该写什么来取代???成功的断言?
我用过assert(structu.z == 0);但很遗憾得到了错误
int main(): Assertion 'structu.z == 0 failed.Aborted'