Error help

N

Neo

Hi friends
where will I get error descriptions for numorous errors I am getting on
my pgm?
 
R

Ravi Uday

Neo said:
Hi friends
where will I get error descriptions for numorous errors I am getting on
my pgm?
What errors ? Compilation/Runtime ?

Generally during runtime, if a system call fails, it sets the global
variable 'errno' with a error number (generally defined in errno.h)
Now if you want to see the error descriptions you can use a standard
function 'strerror( errno );' which returns a pointer to char
describing the latest error in a string equivalent form.
You could probably print the error like -

printf ("Error = %s\n", strerror(errno));

- Ravi
 
M

Mark McIntyre

Hi friends
where will I get error descriptions for numorous errors I am getting on
my pgm?

from the documentation for either the application or your compiler, or
your OS, depending on which is generating the errors.

(C doesn't mandate any specific error numbers or codes, this is
implementation specific)
 
J

Joe Estock

Neo said:
Hi friends
where will I get error descriptions for numorous errors I am getting on
my pgm?

perror() and a decent c manual would be a good start.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top