Are you saying you replaced
Code:
char st[];
by
Code:
char *st;
You haven't allocated any memory for the variable - you need to do this in both cases. I think you are lucky in the first case.

Try
Code:
char st[25] = {0}; // allow plenty of room
or
Code:
char *st = new char[25];
or better yet use an STL string.

Regards
Alan