首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

GetPrivateProfileInt函数返回值有关问题

2012-03-02 
GetPrivateProfileInt函数返回值问题!请问GetPrivateProfileInt函数返回值能用WORD类型接收吗?会有什么不

GetPrivateProfileInt函数返回值问题!
请问GetPrivateProfileInt函数返回值能用WORD类型接收吗?会有什么不良后果吗?

[解决办法]
UINT GetPrivateProfileInt(
LPCTSTR lpAppName,
LPCTSTR lpKeyName,
INT nDefault,
LPCTSTR lpFileName
);

[解决办法]
UINT

为啥用 WORD?
[解决办法]
WORD 16-bit unsigned integer.
This type is declared in WinDef.h as follows:
typedef unsigned short WORD;


UINT Unsigned INT.
This type is declared in WinDef.h as follows:
typedef unsigned int UINT;
[解决办法]
所以,
用 WORD 可能会丢失高位的信息。

热点排行