char * and char []

From: Hades (tourach@cyber1.servtech.com)
Date: 11/30/95


I need to process a string like perform_act does it... and it's using a char
*variable string. But the string I wanty to process is coming from a char
variable[MAX_INPUT_LENGTH] string, and whenever I use strcpy or any opther
way to get the one into the other, it crashes when it tries to manupilate
that variable.

This is what I got:
char command[MAX_INPUT_LENGTH]
char *cmdd;

I wanna make cmdd = command so I can process the cmdd variable in exactly
the same way perform_act does (looking for $? strings, like $n and $N). The
problem is, like I said before... the way perform_act does it, it needs a
char *, but the string I want to process is in the variable[xx] format. Is
there a way to converty one from the other? If I used strcpy or even
sprintf(cmdd, "%s", command) it crashes the first time I try to use the cmdd
variable in any way.

Any help out there?

Thanks.
Hades of Ebon Mists



This archive was generated by hypermail 2b30 : 12/07/00 PST