Re:Your code should be taken out back, lined up against a wa...
by scdlbx on Tuesday July 27, 2010 @02:43PM
(#1552239)
Actually, since st1 is a char* and the sizeof char is 1, that is a valid declaration. It just probably isn't doing what the writer expects. It allocates 5000 bytes and then moves the pointer to point at the very last byte.
edit: Though free()ing it would not work so well until you move the pointer back to the beginning of the 5000 bytes.
edit: Though free()ing it would not work so well until you move the pointer back to the beginning of the 5000 bytes.