TE>> Do you really need to allocate the memory ...
TE>> Or can ou just use an arry? Like:
TE>> char sTemp[256];
KK> All FIDO echo messages are public. :)
I kinda found that out, yes :(
KK> A defined array and and memory allocated to a pointer
KK> may be used interchangeably, of course.
KK> Larger projects will likely take up more memory, naturally,
KK> and require dynamic memory allocation. Getting familiar with
KK> allocation is worth the effort even if it seems pointless
KK> for the present application. If you are writing a small app
KK> and want to keep it as small as possible, then you would
KK> want to omit malloc() and just use defined arrays.
I agree, but I didn't know the app was for training, and the simplest
solution s often the best, so I thought I should mention it since noone else
did.
... If at first you don't succeed, don't be foolish, give up.
Delta - Linux/i586 - delta@mail-me.com KeyID: 0xE63F1AB5
--- BBBS/NT v3.42 ToMmIk-4v
---------------
* Origin: Circle of Protection +47 55961259 ISDN/V.34+ (2:211/37)
|