strerror()Prototype: char *strerror(int errnum);Header File: string.h (C) or cstring (C++) Explanation: Strerror returns a pointer to a string that contains the identification for an error-number. This is usually used with a function that returns an error number based on the result of an operation. It is a very bad idea to start modifying the string it returns. //Example prints out error number 2
#include <iostream>
#include <cstring>
using namespace std;
int main()
{
cout<<strerror(2);
}
Other Functions
|