prog.c: In function ‘myStackCreate’:
prog.c:10:33: warning: implicit declaration of function ‘malloc’ [-Wimplicit-function-declaration]
MyStack * node= (MyStack *) malloc(sizeof(MyStack));
^~~~~~
prog.c:10:33: warning: incompatible implicit declaration of built-in function ‘malloc’
prog.c:10:33: note: include ‘<stdlib.h>’ or provide a declaration of ‘malloc’
prog.c:1:1:
+#include <stdlib.h>
typedef struct {
prog.c:10:33:
MyStack * node= (MyStack *) malloc(sizeof(MyStack));
^~~~~~
prog.c: At top level:
prog.c:55:1: error: unknown type name ‘bool’; did you mean ‘_Bool’?
bool myStackEmpty(MyStack* obj) {
^~~~
_Bool
prog.c: In function ‘myStackEmpty’:
prog.c:57:14: error: ‘true’ undeclared (first use in this function)
return true;
^~~~
prog.c:57:14: note: each undeclared identifier is reported only once for each function it appears in
prog.c:59:16: error: ‘false’ undeclared (first use in this function)
return false;
^~~~~
prog.c: In function ‘myStackFree’:
prog.c:63:9: error: ‘NULL’ undeclared (first use in this function)
obj=NULL;
^~~~
prog.c:63:9: note: ‘NULL’ is defined in header ‘<stddef.h>’; did you forget to ‘#include <stddef.h>’?
prog.c:1:1:
+#include <stddef.h>
typedef struct {
prog.c:63:9:
obj=NULL;
^~~~
prog.c: In function ‘myStackEmpty’:
prog.c:60:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^