110,538
社区成员
发帖
与我相关
我的任务
分享
typedef struct {
char ip[16]; // IP地址
char mac[19]; // MAC地址
}Computer;
struct Computer {
public Char[] ip;//ip地址
public Char[] mac;// mac地址
}
Computer c;
for (int i = 0; i< 20; i++) {
memset(&c, 0, sizeof(Computer));
while (1 ==CmdDevSearchGet(&c)) {
str += " IP:";
str += System::Runtime::InteropServices::Marshal::PtrToStringAnsi((IntPtr)(c.ip));
str += " MAC:";
str += System::Runtime::InteropServices::Marshal::PtrToStringAnsi((IntPtr)(c.mac));
str += "\n";
}
}
Computer c;
System::Runtime::InteropServices::Marshal::PtrToStringAnsi((IntPtr)(c.ip));
再问下版主,这个怎么写