就几行代码为何报错内存不可写入,求修正解决方案

就几行代码为何报错内存不可写入,求修正C/C++ code#include stdio.htypedef struct VertNode{char Verte

就几行代码为何报错内存不可写入,求修正

C/C++ code
#include "stdio.h"typedef struct VertNode{    char VertexType;}VertNode;void main(){    VertNode *vertNode;    printf("请输入一个顶点类型字符:\n");    scanf("%s",&vertNode->VertexType);    }

为何报错内存不可写入,求修正

[解决办法]
VertNode *vertNode = (VertNode *)malloc(sizeof(VertNode));