Malloc + 2d arrays + C

Giorgos Keramidas keramida at ceid.upatras.gr
Wed Mar 20 01:37:01 EET 2002


On 2002-03-19 19:44, cris wrote:
> > >   char **tmp = malloc(arraySize*sizeof(char *));
>
> 	Xwris na isxurizomai oti gnwrizw C auto pou mou kanei entupwsi einai
> 	i parapanw grammi to 'sizeof(char *)' ti timi akribws exei????

To megethos se bytes enos (char *).  Enas pointer einai h 'dieu8unsh
kapoiou antikeimenou'.  Mia dieu8unsh mporei na apaitei pano apo ena bytes
gia na apo8hkeu8ei.  Auto akribos einai to sizeof(char *).  Posa bytes
apaitountai gia na apo8hkeu8ei h dieu8unsh enos 'char'.

Giorgos Keramidas                       FreeBSD Documentation Project
keramida@{freebsd.org,ceid.upatras.gr}  http://www.FreeBSD.org/docproj/



More information about the Linux-greek-users mailing list