我正在阅读维基百科上的Typedef。该页面上提到的示例是
typedef int km_per_hour ;
typedef int points ;
km_per_hour current_speed ;
points high_score ;
...
void congratulate(points your_score) {
if (your_score > high_score)
...
更进一步,它说这我无法理解为什么?
void foo() {
unsigned int a; // Okay
unsigned km_per_hour b; // Compiler complains
long int c; // Okay
long km_per_hour d; // Compiler complains
...
为什么编译器会抱怨 unsigned 和 long?