小弟,刚接触MFC,不知道其中很多用“_”开头的函数有什么特殊含义,是顺便,还是故意这样做的?谢谢

解决方案 »

  1.   

    MFC中的以_开头的一般都是一些宏定义,是用来在使用Unicode和非Unicode之时不需要用户修改程序即可自动完成转换
      

  2.   

    C Ansi Function usually add '_', know from MFC Functioneg:
    Low-Level I/O Functions   
    _close          Close file 
    _commit         Flush file to disk 
    _creat, _wcreat Create file 
    _dup            Return next available file handle for given file 
    _dup2           Create second handle for given file 
    _eof            Test for end of file 
    _lseek, _lseeki64 Reposition file pointer to given location 
    _open, _wopen   Open file 
    _read           Read data from file 
    _sopen, _wsopen Open file for file sharing 
    _tell, _telli64 Get current file-pointer position 
    _umask          Set file-permission mask 
    _write          Write data to file 
      

  3.   

    谢谢楼上的各位啦,让小弟我体会到了社会主义大家庭的温暖^_&
    正如楼上有人说"_"是系统内部的,那是不是意味着这些都不需要特别注意?那在自己写程序的时候如何使用(知道使用)这些"_"开头的变量和函数呢?