这样的错误如何修改
都出现这样的错误:e:\os\funtion.cpp(89) : error C2440: '=' : cannot convert from 'const int' to 'char [50]'
There are no conversions to array types, although there are conversions to references or pointers to arrays.
#define MaxSize 50
typedef char ElemType;
typedef struct lNode /*定义pcd结点类型*/
{
int id; /*进程id*/
ElemType pcb_name[MaxSize]; /*进程名称*/
ElemType status[MaxSize]; /*进程状态*/
struct lNode *next; /*指向同一状态的下一个pcb地址*/
struct lNode *all_q_next;/*指向总链的下一个pcb地址*/
int start_addr;/*程序开始地址*/
}pcb;
.
.
.
.
.
void initialize(pcb *&all_head,pcb *&ready_head,pcb *wait_head)
{
//总链队列头指针
all_head=(pcb *)malloc(sizeof(pcb));
all_head->id=0;
all_head->pcb_name=NULL; //有问题
all_head->status=NULL; //有问题
all_head->start_addr=0;
all_head->next=NULL;
all_head->all_q_next=NULL;
//就绪队列头指针
ready_head=(pcb *)malloc(sizeof(pcb));
ready_head->id=0;
ready_head->pcb_name=NULL; //有问题
ready_head->status=NULL; //有问题
ready_head->start_addr=0;
ready_head->next=NULL;
ready_head->all_q_next=NULL;
//等待队列头指针
wait_head=(pcb *)malloc(sizeof(pcb));
wait_head->id=0;
wait_head->pcb_name=NULL; //有问题
wait_head->status=NULL; //有问题
wait_head->start_addr=0;
wait_head->next=NULL;
wait_head->all_q_next=NULL;
}