-=>Quoting Victor Kemp to All <=-
VK>Hi, maybe that last char to char * question I asked in this
VK>echo was so simple that no-body bothered to reply.
VK>Anyway I need to append a char onto the end of a string, something
VK>like this
VK>char stringvar[90];
VK>char charvar;
VK>strcat(stringvar, charvar);
VK>But that doesn't work, someone please tell me how it's done.
charvar *must* be a string, ie. it must be termintaed with a NULL.
char stringvar[90];
char charvar[2] = "";
//store the char to append to charvar[0] then call strcat
strcat(stringvar, charvar);
Hope that helps...
--- Maximus/2 3.01
---------------
* Origin: Madman BBS * Chico, California * 530-893-8079 * (1:119/88)
|