struct PCB
{
char *Name
;
PCB
* next
;
int arrivalTime
;
int runTime
;
char state
;
}*headPointer
;
PCB
* inPCB
;
pcbQueue
= (PCB
*)malloc(sizeof(PCB
));
cin
>> inPCB
->Name
;
失败!
struct PCB
{
char Name
[20];
PCB
* next
;
int arrivalTime
;
int runTime
;
char state
;
}*headPointer
;
PCB
* inPCB
;
pcbQueue
= (PCB
*)malloc(sizeof(PCB
));
cin
>> inPCB
->Name
;
成功!
这是为啥!
转载请注明原文地址:https://ipadbbs.8miu.com/read-7125.html