Skip to content

Latest commit

 

History

History
105 lines (61 loc) · 2.21 KB

CppChar32_t.md

File metadata and controls

105 lines (61 loc) · 2.21 KB

 

 

 

 

 

 

An char32_t is a keyword that can be used, depending on the standard used:

 

 

 

 

 

 

char32_t is not supported in C++98:

 


int main() {   char32_t c; //Fails in C++98 }

 

Compiler output:

 


/MyFolder/main.cpp:: In function 'int main()': /MyFolder/main.cpp:3: error: 'char32_t' was not declared in this scope /MyFolder/main.cpp:3: error: expected ';' before 'c'

 

 

 

 

 

 

 

char32_t is a keyword for a 32-bit character.

 


int main() {   char32_t c; }

 

Technical note: the code shown is compiled successfully using the G++ 4.4.5 compiler, which is supplied with the Qt Creator 2.0.0 IDE.