0

Is it frowned upon to declare char's this way

char a = "a"[0];

3rd Feb 2017, 8:28 PM
Bill
Bill - avatar
3 Answers
+ 9
It is bad practice You can use single quotes to create character Example char a = 'a';
3rd Feb 2017, 8:56 PM
WittyBit
WittyBit - avatar
+ 8
Why would you ever do that if you can just write char a = 'a';?
3rd Feb 2017, 11:36 PM
Filip
Filip - avatar
0
I was reading the tutorial about how char's could only be declared using single quotes and I thought I know another way. it was absurd I grant you that
3rd Feb 2017, 11:41 PM
Bill
Bill - avatar