#include <stdio.h>
#include <stdlib.h>
struct c_node{
char data;};
int main()
{
struct c_node *head=(c_node *)malloc(sizeof(* head));
head->data='https://bbs.csdn.net/topics/g';
return 0;
}
當我除錯這個簡單的程式,到第八行時就無法繼續走下去了,請問是為什么呢?希望有大神解答下!
uj5u.com熱心網友回復:
struct c_node *head=(c_node *)malloc(sizeof(* head));改成
struct c_node *head=(c_node *)malloc(sizeof(c_node));
uj5u.com熱心網友回復:
struct c_node *head = (struct c_node *)malloc(sizeof(struct c_node));uj5u.com熱心網友回復:
怎么進行不下去了,什么都不干,他就回家了
#include <stdio.h>
#include <stdlib.h>
struct c_node{
char data;
};
int main()
{
struct c_node *head=(c_node *)malloc(sizeof(* head));
head->data='https://bbs.csdn.net/topics/g';
printf("%c\n",head->data);
return 0;
}
uj5u.com熱心網友回復:
struct c_node *head=(struct c_node *)malloc(sizeof(struct c_node));
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/244925.html
標籤:新手樂園
上一篇:求大神回答一下 這個題怎么做
