这段代码编译后 结果是什么?
#include <windows.h>#include <math.h>#pragma comment(lib,"gdi32.lib")int main(){ WORD ramp[256*3]; for( int i=0; i<256; i++ ) { ramp[i+0] = ramp[i+256] = ramp[i+512] = (WORD)min(65535, max(0, pow((i+1) / 256.0, 0.3) * 65535 + 0.5)); } SetDeviceGammaRamp(GetDC(NULL), ramp); return 0;}#include <windows.h>#include <math.h>#pragma comment(lib,"gdi32.lib")int main(){ WORD rampOld[256*3]; for( int i=0; i<256; i++ ) { rampOld[i] = rampOld[i+256] = rampOld[i+512] = 256 * i; } SetDeviceGammaRamp(GetDC(NULL), rampOld); return 0;}
[解决办法]