📅  最后修改于: 2020-09-25 10:26:53             🧑  作者: Mango
iswgraph() 函数在
int iswgraph(wint_t ch);
iswgraph() 函数检查ch
是否具有按当前C语言环境分类的图形表示形式。默认情况下,以下字符是图形:
#include
#include
#include
using namespace std;
int main()
{
setlocale(LC_ALL, "en_US.UTF-8");
wchar_t ch1 = L'\u0009';
wchar_t ch2 = L'\u03a9';
iswgraph(ch1)? wcout << ch1 << L" has graphical representation" : wcout << ch1 << L" does not have graphical representation";
wcout << endl;
iswgraph(ch2)? wcout << ch2 << L" has graphical representation" : wcout << ch2 << L" does not have graphical representation";
return 0;
}
运行该程序时,输出为:
does not have graphical representation
Ω has graphical representation