Ex 26. Strange behaviour of mkdir function

Hello everyone. I try to create program in c lang according to excercise. I tried to use stat function to decide whereas the folder “~/.logfind” and if it is not exist create it. But when I tried to create this dir by function mkdir from my desktop directory I got -1 that means that I didn’t create it. If I try to create by mkdir “./.logfind” it will work ok. What is the problem and where I can read about this? Thank you for your answers

If your goal is to simply make a hidden directory, mkdir .logfind will do it.
If that directory already exists in your home directory, then typing cd ~/.logfind will navigate to it. ./ is a way of executing a command in *nix.