my source code is bellow :
#include <QtCore/QCoreApplication>
#include <stdio.h>
#include <errno.h>
using namespace std;
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
printf("salam\n");
int num = 10;
int ss;
ss = num / 0;
printf("%s\n",strerror(errno));
return a.exec();
}
i want to show my error string for "divide to zero"!
but the output is :
salamno such file or directory
please help me how use of errno and errorstring in c++?