64,636
社区成员
发帖
与我相关
我的任务
分享
if( nYBlockOff < 0 || nYBlockOff >= nBlocksPerColumn )
{
ReportError( CE_Failure, CPLE_IllegalArg,
"Illegal nYBlockOff value (%d) in "
"GDALRasterBand::WriteBlock()\n",
nYBlockOff );
#include <time.h>
#include <stdlib.h>
#include <windows.h>
int main() {
int a,b[11];//本来是b[10],为判断哪句越界,故意声明为b[11]
srand((unsigned int)time(NULL));//按两次F11,等黄色右箭头指向本行时,调试、新建断点、新建数据断点,地址:&b[10],字节计数:4,确定。
while (1) {//按F5,会停在下面某句,此时a的值为10,b[10]已经被修改为对应0..4之一。
b[(a=rand()%11)]=0;
Sleep(100);
b[(a=rand()%11)]=1;
Sleep(100);
b[(a=rand()%11)]=2;
Sleep(100);
b[(a=rand()%11)]=3;
Sleep(100);
b[(a=rand()%11)]=4;
Sleep(100);
}
return 0;
}
#include <iostream>
#include <string>
#include <windows.h>
using namespace std;
class aytest
{
public:
int nBlocksPerColumn;
int nRasterXSize;
aytest()
{
nBlocksPerColumn = 0;
}
~aytest()
{
}
};
int main() {
aytest mytest;
aytest* p = &mytest;
p->nRasterXSize = 1;
p->nRasterXSize = 2;
p->nRasterXSize = 3;
system("pause");
}
#include <iostream>
#include <string>
using namespace std;
int main() {
int *p;
int nBlocksPerColumn;
p = &nBlocksPerColumn;
nBlocksPerColumn = 1;
nBlocksPerColumn = 2;
nBlocksPerColumn = 3;
system("pause");
}