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)来帮助你的问题格式化。 –