我不明白为什么指针加法失败。指针加法
DWORD *pipebuf=new DWORD[10001];
Command *cr= (Command*)pipebuf;
cr->command=2;
DWORD* rooms=(pipebuf+1); //should work fine..sets the room pointer equal to pipe[2]
*rooms=buff3; //where buff3=100
然而,pipebuf的值只包含命令的值,它不包含buff3的值。然而,当我删除新的关键字,它工作正常......为什么?
DWORD = unsigned_int
命令与命令的DWORD变量类..像这样
Class Command {
DWORD command;
}
什么是DWORD和命令? – Mahesh 2011-03-19 09:12:08
DWORD = unsigned_int。命令是一个包含命令的DWORD变量的类 – Jake 2011-03-19 09:14:13
这是什么语言? C++? – Mat 2011-03-19 09:15:02