We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
//使用前面的类ADT,创建一个数组 auto adt_p = new ADT[10]; cout << *((int*)(adt_p)-2)<< endl; cout << *((int*)(adt_p)-1)<< endl;
结果为: 10 0 说明并不是在数组前分配4个字节,而是分配了8(2*sizeof(int))个字节
2*sizeof(int)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
结果为:
10
0
说明并不是在数组前分配4个字节,而是分配了8(
2*sizeof(int)
)个字节The text was updated successfully, but these errors were encountered: