N
nick
the following is my programming code and compile message
why the warning message arise, have i done somethings wrong?
#include<stdio.h>
typedef struct card{
int abc;
}card;
int main(){
card *d;
d = (card*) malloc(sizeof(card));
return 0;
}
the compile message :
--------------------Configuration: test - Debug--------------------
Compiling source file(s)...
test.c
test.c: In function `main':
test.c:11: warning: implicit declaration of function `malloc'
Linking...
test.exe - 0 error(s), 1 warning(s)
thanks!
why the warning message arise, have i done somethings wrong?
#include<stdio.h>
typedef struct card{
int abc;
}card;
int main(){
card *d;
d = (card*) malloc(sizeof(card));
return 0;
}
the compile message :
--------------------Configuration: test - Debug--------------------
Compiling source file(s)...
test.c
test.c: In function `main':
test.c:11: warning: implicit declaration of function `malloc'
Linking...
test.exe - 0 error(s), 1 warning(s)
thanks!