Alex6788, on 26 September 2010 - 10:30 AM, said:
Turn on the display of warnings in VS. You are writing bad code and not letting the IDE tell you about it.
There is absolutely no way 2 chars can fit into a single char. That's just basic common sense.
If you enable the display of warnings you should get told about that. Something along the line of these messages from GCC
DIC.cpp:32:7: warning: multi-character character constant DIC.cpp:33:14: warning: multi-character character constant DIC.cpp: In function ‘int main()’: DIC.cpp:32: warning: overflow in implicit constant conversion DIC.cpp:32: error: duplicate case value DIC.cpp:24: error: previously used here DIC.cpp:33: warning: overflow in implicit constant conversion DIC.cpp:33: error: duplicate case value DIC.cpp:25: error: previously used here
For point of reference line 33 in the posting aligns with line 33 in the above messages.
BTW
Some whitespace is good.
Far too much useless whitespace (as in your posted code) is bad.
You are looking for the Goldilocks of 'just the right amount' of whitespace.

New Topic/Question
Reply





MultiQuote







|