osmak,
I have asked myself the same question. Like you, I also found that the programs I have written so far compile without choosing not set in properties.
I am no expert, and I am using the book for independent study (not any school course). Based on some basic knowledge and research, I can speculate why the author has included the passage you are referring to. Logically the explanation which follows makes good sense to me.
ASCII is single bit code which allows 256 distinct characters. These characters can be produced by a standard keyboard and are more or less English language oriented. Unicode is two bit code which allows 65,536 characters. The extra character set supported by Unicode allows characters used by other languages to be understood by the computer. For example to have a functional understanding of Japanese, you must know about 1000 characters out of the 50,000 total character set. In Chinese you must know about 1000 characters out of the 80,000 total character set.
How does this apply to C++ Win32 projects?
An over simplified explanation here will prevent attempting to deal with concepts which will be discussed in detail later in the book. An essential part of the programming knowledge deals with strings. Strings are a collection of characters. The programming language and compiler join forces to allocate memory to store strings and variables. So far I have presented only fact.
Now I will deal with speculation based on the facts as I understand them. C++ reserves one byte of memory to store characters. (2 raised to the 8th power = 256 characters) Unicode is two bytes in size. (2 raised to the 16th power = 65,536 characters) I am beginning Chapter 3. I don't know how far into the book you are right now. The programs to this point have not been dealing with character or string manipulation.
When we get to character and string manipulation I expect a conflict if properties are set to use Unicode. The compiler will be expecting to use two bytes of memory where C++ is specifying one byte of memory. I would anticipate a compiler error pointing to a problem with memory allocation or a type conflict. Furthermore if properties are chosen as not set, I expect the compiler to allow the C++ code to determine the type and memory allocation.
If you have programmers at work or are in school and have programming instructors available, you may be able to bounce my speculation off them to see if I speculate correctly. I sure would like to know if I connected the dots right on this.
drpepper
|