TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: NEIL HELLER
from: JONATHAN DE BOYNE POLLARD
date: 1998-03-09 21:22: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++.
It's C++ as well.  Especially so if there are statements between the first 
declaration and the second (which is allowed in C++, but ill formed in C).
 ¯ JdeBP ®
--- FleetStreet 1.19 NR
---------------
* Origin: JdeBP's point, using Squish (2:440/4.3)

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