[En-Nut-Discussion] pointer don't work?

Landsperger, Werner Werner.Landsperger at cassidian.com
Thu May 12 15:28:51 CEST 2011


Hey together,
I'm really become to desperate....
 
char *buff;
buff = malloc(128);
char *pointer;
 
cnt = fread(buff, 1, 128, istream);    // read in a buffer -> cnt = 128
pointer = &buff;                               // should set a pointer
to buff
cnt = strlen(pointer);                        // should be 128 but ->
cnt = 22 ????
 
I've also tried *pointer and so on but with no result! where is my error
in reasoning? 
Normaly pointer are no problem but I can't see the problem!!
 
Thanks a lot!!
 
Greets Werner
 



More information about the En-Nut-Discussion mailing list