K
Kelly
Hi,
Ashamed to ask basic question but I cannot get this code to run,
#define Y one
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main (void) {
//Y=malloc(sizeof(char *));
printf ("%s",Y);
return 0;
}
I can compile but not run, gives me "the memory cannot be read".
All I want is to printf Y.
Please help, I know this is easy for most of you.
Thanks.
Kel
Ashamed to ask basic question but I cannot get this code to run,
#define Y one
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main (void) {
//Y=malloc(sizeof(char *));
printf ("%s",Y);
return 0;
}
I can compile but not run, gives me "the memory cannot be read".
All I want is to printf Y.
Please help, I know this is easy for most of you.
Thanks.
Kel