[Sussex] More C programming help

Captain Redbeard hairy.one at virgin.net
Thu May 12 23:49:52 UTC 2005


 > sparkeh(?) said:
 >
 > So you really want to be allocating 100 * sizeof(char
 > *) - I think that's the root of the problem.

OK, so I've changed the relevant line to:

CharArray = (char **) malloc ((sizeof (char *)) * \ ArraySize);

That seems to do the trick, ta.



-- 
Captain Redbeard



======================================================
Insomnia - it's not a condition, it's a mentality.
Registered Linux user: 388693.
Registered Linux machines: 289172, 289173.
v2sw5+8C+JGhw5ln4/5pr6/7Ock1ma6/8l6+8Sw3+2e4t2b9Hen4+6
g5+3RHaIr9 Hackerkey.com
======================================================




More information about the Sussex mailing list