Are you saying you replaced
byCode: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.Code:char *st;
Try
orCode:char st[25] = {0}; // allow plenty of room
or better yet use an STL string.Code:char *st = new char[25];
Regards
Alan




Reply With Quote