我在一个程序里看到
WIN32_FIND_DATA findData;
CString tFile;
tFile=findData.cFileName;
if(tFile=="."||tFile=="..")"."和".."分别代表什么啊, 很纳闷,希望高人指点下。

解决方案 »

  1.   

    "."代表当前目录
    ".."代表上级目录MSDN:
    Use a period (.) as a directory component in a path to represent the current directory. 
    Use two consecutive periods (..) as a directory component in a path to represent the parent of the current directory. 
      

  2.   

    "."代表当前目录 
    ".."代表上级目录  CMD里试下就可以肯见效果了
      

  3.   

    cmd里 测试cd .
    cd ..
      

  4.   


    //呵呵,看来还是学过dos或者linux的好。