// pointer_to_Byte_array.cpp
// compile with: /clr
using namespace System;
int main() {
Byte bArr[] = {1, 2, 3};
Byte* pbArr = &bArr[0];
array ^ bArr2 = gcnew array{1,2,3};
interior_ptr pbArr2 = &bArr2[0];
}
// pointer_to_Byte_array.cpp
// compile with: /clr
using namespace System;
int main() {
Byte bArr[] = {1, 2, 3};
Byte* pbArr = &bArr[0];
array ^ bArr2 = gcnew array{1,2,3};
interior_ptr pbArr2 = &bArr2[0];
}
本文标题:c++获取数组的指针
本文链接:https://www.haomeiwen.com/subject/fdiqxttx.html
网友评论