. means “current directory” and .. means “parent directory”.
For example, if your directory is C:\Users\Bob, . refers to C:\Users\Bob and .. refers to C:\Users.
You will find that this is universal in programming and computers in general.
C语言检查当前的current directory是什么:
1 | char* _getcwd( char *buffer, int maxlen ); |
Visual Studio 2019与2017的当前目录判定似乎有些不一样,2019版会将工程目录认为是当前目录,2017版则不一样。总之,开始编码前进行确认是必要的。
参考资料