0
這裏是我的代碼錯誤:預期indentifier或 '(' 前 '=' 令牌
#include <linux/list.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/printk.h>
#include <linux/slab.h>
typedef struct list_head list;
typedef struct student *ptr;
typedef struct student *studentDemo;
static LIST_HEAD(student_list);
struct student{
int studentNumber;
int courseCredit;
float grade;
studentDemo = kmalloc(sizeof(*studentDemp), GFP_KERNEL);
studentDemo -> studentNumber = 760120495;
studentDemo -> courseCredit = 3;
studentDemo -> grade = 3.0;
INIT_LIST_HEAD(&studentDemo->list);
}
歡迎StackOverflow的一個例子!請不要鏈接到代碼,而是使用文本編輯器中的代碼選項添加它。我會推薦閱讀[這篇文章](http://stackoverflow.com/help/how-to-ask)來幫助你的問題格式化。 –