" long unsigned typedef int long ullong; "是什么意思?

What does `long unsigned typedef int long ullong;` mean?

本文关键字:long 是什么 意思 int unsigned typedef ullong      更新时间:2023-10-16

在typepedef的cppreference页面中,有一个例子:

// typedef can be used anywhere in the decl-specifier-seq
long unsigned typedef int long ullong;

我不明白这是什么意思....请帮忙吗?

意思相同
typedef unsigned long long int ullong;

五个词typedef, unsigned, long, longintdecl-specifiers,形成了一个decl-specifier-seq,并且decl-specifier-seq的意义或有效性与decl-specifier的顺序无关。

请注意,int static x;的含义与static int x;相同,void virtual f();的含义与virtual void f();相同,以提供一些额外的示例

unsigned long long int 

是c++中的一种数据类型。这一行基本上为它创建了一个别名:"ullong"。