如何将错误添加到错误堆栈?
这是我想要的一个例子
#include <stdio.h>
#include <stdlib.h>
int Div (int a, int b, int * c) {
   if (b == 0) {
       // add to perror: "cannot divide by zero!"
       return 0;
   }
   *c = a / b;
   return 1;
}
int main () {
   int n;
   if (!Div(2, 0, &n)) {
      perror("could not divide");
   }
   return 1;
}