问两个奇怪的问题
问题一:
#include "stdafx.h"
编译器为什么会在上面这行代码处报告如下warning:
warning C4652: compiler option 'Generate Browser Info' inconsistent with precompiled header; current command-line option will override that defined in the precompiled header
好象是说编译器的设置和当前命令行不一致,该行代码将被忽略(不起作用?);但我把这行删去或注释掉,它以会在程序最后处报告如下错误:
fatal error C1010: unexpected end of file while looking for precompiled header directive
Error executing cl.exe.
为何会这样??
问题二:
SetWindowPos(hwnd, NULL,
GetSystemMetrics(SM_CXFULLSCREEN) - (rc.right - rc.left),
GetSystemMetrics(SM_CYFULLSCREEN) - (rc.bottom - rc.top),
0, 0, SWP_NOSIZE | SWP_NOZORDER);
上面的代码为何会报告如下错误:
error C2065: 'SetWindowPos' : undeclared identifier
Error executing cl.exe.
我在函数前面加上::也没用,有时用SetWindowLong()函数也会出现这样错误。怎么回事呢?