#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define LIMIT 100
typedef struct stack
{
char x[LIMIT][10];
int top;
void push(char *s);
char *pop();
void init();
bool is_empty();
} stack;
void stack init()
{
this->top = 0;
}
And the codes continue, but it gives this error:
main.c|14|error: field 'init' declared as a function|
What's wrong? I can’t figure it out from yesterday. Please help me.
user3575963
source
share