B
Bill Cunningham
I have never seen anyone declare anything of type size_t to pass to
malloc but I have an example here. I used lcc this times and it had fits
with this code.
#include <stdio.h>
#include <stdlib.h>
main() {
char *man;
man=malloc(sizeof man);
free(man);}
Warning p.c: 4 no type specified. Defaulting to int
Error p.c: 7 found 'pointer to char' expected a function
Warning p.c: 7 missing prototype
Error p.c: 7 illegal expression
Error p.c: 7 syntax error; found `}' expecting ')'
Error p.c: 7 type error in argument 1 to `free'; found 'void' expected
'pointer to void'
Error p.c: 7 syntax error; found `}' expecting ')'
Error p.c: 7 Syntax error; missing semicolon before `}'
malloc but I have an example here. I used lcc this times and it had fits
with this code.
#include <stdio.h>
#include <stdlib.h>
main() {
char *man;
man=malloc(sizeof man);
free(man);}
Warning p.c: 4 no type specified. Defaulting to int
Error p.c: 7 found 'pointer to char' expected a function
Warning p.c: 7 missing prototype
Error p.c: 7 illegal expression
Error p.c: 7 syntax error; found `}' expecting ')'
Error p.c: 7 type error in argument 1 to `free'; found 'void' expected
'pointer to void'
Error p.c: 7 syntax error; found `}' expecting ')'
Error p.c: 7 Syntax error; missing semicolon before `}'