1> file.m_hFile != CFile::hFileNull 判断文件是否已打开
CFile file;
....
if (file.m_hFile != CFile::hFileNull)
{
file.Close();
}
else
{
printf("File Already Close \n");
}
2>str.Format(“%I64d”,a)中的“%I64d”,指64位整型,或者说是LONGLONG
在C/C++中,64为整型一直是一种没有确定规范的数据类型。现今主流的编译器中,对64为整型的支持也是标准不一,形态各异。一般来说,64位整型的定义方式有long long和__int64两种(VC还支持_int64),而输出到标准输出方式有printf(“%lld”,a),printf(“%I64d”,a),和cout << a三种方式。