TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: NEIL HELLER
from: MATHIEU BOUCHARD
date: 1998-02-27 02:09:00
subject: CONVERTING CHAR TO

JdBP>> Or, idiomatically :
JdBP>>         char ch ;
JdBP>>         char str[2] = { ch } ;
MB>> does that guarantee that str[1] == 0 ?
 NH> Yes.
 NH> char str[10] = {'a'};
 NH> guarantees the str[1] thru str[9] are all hex zeroes.  But this is C,
 NH> not C++.
What is it in C++ ?
i suppose it's
char str[10] = {'a',};
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™.