Instead of printf("Error");
, you should try perror("Error")
which may print the actual reason of failure (like Permission Problem, Invalid Argument, etc).
Instead of printf("Error");
, you should try perror("Error")
which may print the actual reason of failure (like Permission Problem, Invalid Argument, etc).