大佬们,为啥会出现3221225477错误
#include <iostream>
#include <stdlib.h>
#include <stdio.h>
using namespace std;
typedef struct node
{
int *base;
int *top;
}theStack;
int main()
{
theStack *S;
S->base =(int *)malloc(sizeof(int)*10);
return 0;
}
其中,如果主函数中改为 theStack S; S.base =(int *)malloc(sizeof(int)*10);就不会出错,这是为啥???