How to set errno value?

For all practical purposes, you can treat errno like a global variable (although it’s usually not). So include errno.h and just use it:

errno = ENOENT;

You should ask yourself if errno is the best error-reporting mechanism for your purposes. Can the functions be engineered to return the error code themselves ?

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)