为什么返回值总是0呢?
这是个读写配置文件的问题,我所使用的类见:http://dev.csdn.net/develop/article/46/46139.shtm
但是我在使用的时候发现是用到dwRetValue = GetPrivateProfileString(
(LPCTSTR)strSection,
NULL,
_T(""),
chSection,
sizeof(chSection)/sizeof(TCHAR),
(LPCTSTR)m_strPath);
的地方返回的值都是0,并且GetPrivateProfileString()的地方返回的值都是0,怎么都不会改变,这是怎么回事呢?
我用的配置文件如下:
[student]
number=40
male=25
female=15
average_age=15
[computer]
cpu=2.0
motherboard=ASUS
harddisk=120
ram=512
display=sansung