Questions tagged [errno]

errno is an integer variable, which is set by system calls and some library functions in the event of an error to indicate what went wrong. Its value is significant only when the return value of the call indicated an error.

errno is an integer variable, which is set by system calls and some library functions in the event of an error to indicate what went wrong. Its value is significant only when the return value of the call indicated an error.

559 questions
-2
votes
2 answers

How to import ENOENT so I can return it?

If an error occurs, I need to return ENOENT but I'm not sure which library this is from and surprisingly nothing came up on a Google search.
User
  • 23,729
  • 38
  • 124
  • 207
-3
votes
1 answer

Opening a file gives unexpected return value

could someone please explain me, why file opening is not successful? why printing "file" will give -1? Is it a problem with char *source? int opf(char *source){ int file; file=open(source,O_RWR); printf("%d",file); } And is it possible…
letter
  • 91
  • 1
  • 7
-6
votes
2 answers

PermissionError: [Errno 13] Permission denied:

I'm trying to write in a txt file the vertices of a spline mesh, but I get this error: PermissionError: [Errno 13] Permission denied: 'C\:Windows\system32\vt_84.txt The code is
Krystel Isabel
  • 1
  • 1
  • 1
  • 1
-7
votes
1 answer

note: expected ‘int * (*)()’ but argument is of type ‘int’

Is it too long for me that not writing any code. I have try to write a simple demo in C, but meet below, 1 main.c|87 col 21 warning| passing argument 2 of ‘Logger’ makes pointer from integer without a cast [-Wint-conversion] 2…
Windeal
  • 87
  • 1
  • 9
1 2 3
37
38