TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: VICTOR KEMP
from: VADIM MIHAILOV
date: 1998-01-17 11:17:00
subject: converting char to string

    „¥­ì ¤®¡àë©, Victor!
ÚÄÄÄÄÄÄÄ--ùùú
|€ ¡ë«® íâ® (ª ª é á ¯®¬­î) ‚âp Ÿ­¢ 13 1998 20:05, ¨ ¯¨á « Victor Kemp
:All:
 VK> I would like to concatenate a single char onto the end of a string but
 VK> it says it can't convert int to char * when I do this:
 VK>            char charvar;
 VK>            char stringvar[90];
 VK>            strcat(stringvar, charvar);
 VK> I also tried doing:
 VK>            strcat(stringvar, (char *)charvar);
 VK> but that made a big mess of things although gave no error message.
May be:
char charvar;
char str[100];
char temp[2]=" ");
temp[0]=charval;
strcat(str,temp);
Or if you now length of the string:
char str[100]="RTFM";
char charval;
str[4]=charval;
str[5]=0;
                                                                         :
    ‚ᥣ®.        Vadim                                                  |
                 úúúúùùùù------ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
--- GoldED/386 2.50+
---------------
* Origin: ˆ¤¥ï ª®­¥ç­® å®à®è ï, ­® 㦠᫨誮¬ ¯«®å ï (2:5025/88.9)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.