TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: JONATHAN DE BOYNE POLLARD
from: MATHIEU BOUCHARD
date: 1998-02-27 01:56:00
subject: converting char to string

 MB>> way #2:
 MB>> char foo[2] = { charvar, 0 };
 MB>> strcat (stringvar, foo);
 JdBP> I'm glad that I'm not the only one familiar with #2.  (-:
 JdBP> One slight niggle: The return value from strlen() is a `size_t' not an 
 JdBP> `int'.
 JdBP> On some platforms, notably 16-bit Intel x86 architectures using "huge" 
 JdBP> memory
 JdBP> models, `size_t' is a wider type than `int' is.  
Some people are very knowledgeful and i certainly like that.
matju
--- Terminate 4.00/Pro
---------------
* Origin: The Lost Remains Of SatelliteSoft BBS (1:163/215.42)

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