برنامه را به این صورت اصلاح کنید ببینید درست می شه

int temp ;
HDC dc = GetDC(NULL);
if (!dc)
{
cerr << "error!";
return;
}
ofstream __0("number.txt",ios::app);
while (1){


color1 = GetPixel(dc, 706,336);//
color2 = GetPixel(dc, 706,337);//
color3 = GetPixel(dc, 706,338); //
color4 = GetPixel(dc, 704,336); //
///////////////////////////1
if (color1==16777215 && color2==16777215 && color3==16777215 && color4!=16777215){
cout<<"1"<<endl; temp=1;
__0<<1<<endl<<endl;
continue;
}
///////////////////////////2
if (color1==16777215 && color2==16777215 && color3==16777215 && color4!=16777215){
cout<<"2"<<endl; temp=2;
__0<< 2 <<endl<<endl;
continue;
}
}
__0.close();


ReleaseDC(NULL, dc);