C++关键字
关键字是保留字。您不能将其用作变量名,常量名等。以下列出了C++语言中32个关键字的列表,这些关键字也可用C语言提供。
auto |
break |
case |
char |
const |
continue |
default |
do |
double |
else |
enum |
extern |
float |
for |
goto |
if |
int |
long |
register |
return |
short |
signed |
sizeof |
static |
struct |
switch |
typedef |
union |
unsigned |
void |
volatile |
while |
下面列出了30种C++语言的关键字,这些关键字在C语言中不可用。
asm |
dynamic_cast |
namespace |
reinterpret_cast |
bool |
explicit |
new |
static_cast |
false |
catch |
operator |
template |
friend |
private |
class |
this |
inline |
public |
throw |
const_cast |
delete |
mutable |
protected |
true |
try |
typeid |
typename |
using |
virtual |
wchar_t |