_cpluscplus

_cpluscplus是c++中的定义,而c中没有该定义

1.用来判定代码是c类型还是c++类型

2._cplusplus的类型是"long int",值为199711L

1 int main()
2 {
3 #ifdef _cplusplus
4 printf("This is c++ program");
5 #else
6 printf("This is c program");
7 }

 

posted on 2016-05-19 22:06  小菜鸡y  阅读(1458)  评论(0编辑  收藏  举报