mag*_*e f 0 c malloc struct typedef
我有一个struct
指针,我想动态分配内存.
struct employeeStructure {
char name[100];
char address[255];
int age;
char ssnum[100];
};
typedef struct employeeStructure employee;
/* and in my main function */
employee *employeeRecord;
employeeRecord = malloc(sizeof(employee));
->>>
->>> error: assigning to 'employee *' (aka 'employeeStructure *') from incompatible type 'void *'
->>>
Run Code Online (Sandbox Code Playgroud)
我得到了一个error: assigning to 'employee *' (aka 'employeeStructure *') from incompatible type 'void *'
.
归档时间: |
|
查看次数: |
3828 次 |
最近记录: |