TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: VICTOR KEMP
from: MART ORUAAS
date: 1998-01-21 19:00:00
subject: char to string

Hi Victor!
17 Jan 98, Eric Londaits writes to Victor Kemp:
 EL> strcat(stringvar, &charvar);
no, it does not work, because &charvar does not point to null-terminated 
string.
strncat(stringvar, &charvar, 1); is the answer. it copies one character from 
the string pointed by &charvar and then appends \0.
fazz
--- GEcho 1.11+
---------------
* Origin: l'Ermite (FidoNet 2:490/18)

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™.