在C语言中,变量名中的双下划线表示什么? [英] What does a double underscore mean in a variable name in the C language?

查看:457
本文介绍了在C语言中,变量名中的双下划线表示什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能重复:
为什么人们这么多使用__(双下划线) C ++

Possible Duplicate:
Why do people use __(double underscore) so much in C++

我正在研究Linux内核编程代码.

I was studying the Linux kernel programming code.

有些数据结构和功能以双下划线开头,例如:

There are some data structures and functions which start with a double underscore like:

__u32  len

与普通变量有何不同?

推荐答案

这表示它是系统保留的名称. C标准规定,所有以两个下划线(或下划线和大写字母)开头的名称均保留供系统或编译器使用,不应在应用程序代码中定义.

It means it's a system-reserved name. The C standard says that all names beginning with two underscore, or underscore and capital letter, are reserved for the use of the system or compiler and should not be defined in application code.

这篇关于在C语言中,变量名中的双下划线表示什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆