0

Hey!

I'm a beginner and I am making a code about getting the directory of a file, but I have something that I don't understand.

What's the meaning of "./" in
DS = opendir ("./");

I have searched a lot of sites about C programming, but nothing gave me a good explanation. I have to present my code soon, forcing me to explain every single line of my code. Please help me. Thanks!

Edited by CharAmel

2
Contributors
3
Replies
16
Views
2 Years
Discussion Span
Last Post by rubberman
1

The "./" means "use the current directory where your application is running". The dot is the current directory. If it was "../" it would point to the directory above where you are. If it was "~/" then it would point to your home directory.

0

NP. Sometimes reading the manual helps... :-) In any case, it was a sensible question for a newbie. Sometimes what is obvious to us "old-timers" isn't so to newer programmers.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.