wchar_t is defined even in C89, but you have to include <stdlib.h> or <stddef.h>.
http://en.wikipedia.org/wiki/Wide_character#C.2FC.2B.2B
Quote:
The wide characters are defined using datatype wchar_t, which in the original C90 standard was defined as
"an integral type whose range of values can represent distinct codes for all members of the largest extended character set specified among the supported locales" (ISO 9899:1990 §4.1.5)
|
I've even tried it in TurboC++ 1.01 for DOS (not the Unicode program above, only one with a wchar_t instead of char, and literals preceded with L. Of course the Unicode part can be platform dependent, but I think nowadays it'll be standard.
Why a teacher would make someone who's starting to program deal with this, is beyond me...