JdBP>>> char str[2] = { ch } ;
TH>> Not at initilation time, at runtime
JdBP> I don't understand your objection.
I have a (good IMO) habit of declaring all my variables that will be used in
the entire function in the beginning. Just like C force you too (yes I do
know about {} but let's just ignore that for a sec).
So I don't do this:
char ch;
... lots and lots of code altering ch ...
char str[2] = {ch};
I put the char str[] declaration up with char ch.
Nicer IMO.
I program mostly C so it's better in all ways.
I see initilation of vars as an init thing, which makes it easier to read
(again: IMO).
JdBP> My only guess is that you aren't familiar with this particular part of
the C++ language,
No, this one time I am correct! Dammit! :-)
---
---------------
* Origin: Q U A K E 2 ! ! ! ! ! ! ! ! (2:201/293.22)
|