永发信息网

c++ 保留字(关键字)是什么意思??

答案:2  悬赏:30  手机版
解决时间 2021-03-17 23:12
  • 提问者网友:沦陷
  • 2021-03-17 17:12
c++ 保留字(关键字)是什么意思??
最佳答案
  • 五星知识达人网友:痴妹与他
  • 2021-05-19 02:39
所有带__的都是编译器自定义关键字,其它都是c++定义的
vc中的关键字

__abstract 2
abstract
__alignof Operator
array

__asm
__assume
__based
bool

__box 2
break
case
catch

__cdecl
char
class
const

const_cast
continue
__declspec
default

__delegate 2
delegate
delete
deprecated 1

dllexport 1
dllimport 1
do
double

dynamic_cast
else
enum
enum class

enum struct
event
__event
__except

explicit
extern
false
__fastcall

__finally
finally
float
for

for each, in
__forceinline
friend
friend_as

__gc 2
gcnew
generic
goto

__hook 3
__identifier
if
__if_exists

__if_not_exists
initonly
__inline
inline

int
__int8
__int16
__int32

__int64
__interface
interface class
interface struct

interior_ptr
__leave
literal
long

__m64
__m128
__m128d
__m128i

__multiple_inheritance
mutable
naked 1
namespace

new
new
__nogc 2
noinline 1

__noop
noreturn 1
nothrow 1
novtable 1

nullptr
operator
__pin 2
private

__property 2
property
property 1
protected

public
__raise
ref struct
ref class

register
reinterpret_cast
return
safecast

__sealed 2
sealed
selectany 1
short

signed
__single_inheritance
sizeof
static

static_cast
__stdcall
struct
__super

switch
template
this
thread 1

throw
true
try
__try/__except, __try/__finally

__try_cast 2
typedef
typeid
typeid

typename
__unaligned
__unhook 3
union

unsigned
using declaration, using directive
uuid 1
__uuidof

value struct
value class
__value 2
virtual

__virtual_inheritance
void
volatile
__w64

__wchar_t, wchar_t
while
全部回答
  • 1楼网友:猎心人
  • 2021-05-19 02:57
关键字就是c++语法的一部分 如if int等单词 你不能使用它来做变量名等 保留字就是将来有可能会变成关键字的 为了避免以后会用到 所以最好不要使用
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯