Possible duplicate:
Why are characters characters characters C characters instead of characters?
Why is using sizeof('x') return 4 when using C, but sizeof('x') in C ++ returns 1?
C ++ usually tends to be nothing more than a superset of C, so why do the two results diverge?
Edit Another refinement. This seems like a deliberate step by the standards committee, and I suggest that resizing the x would not have been done without good reason. I am interested in what is the reason.
c ++ c
doron
source share