#include<iostream>
#include<string>
using namespace std;
const char* hello(){
/*本来执行下面的注释就可以了,但是vs2015中此函数不可用*/
//return _func_;
/*_func_实现的方式相当于下面的方式*/
static const char* _func_ = "hello";
return _func_;
}
int main()
{
/*c++11与c99兼容的宏下面的代码在VS2015中不可用*/
//cout << "包含完整的标准c库?" << __STDC_HOSTED__ << endl;
//cout << "编译器的实现是否和c标准一致?" << _STDC_ << endl;
//cout << "版本的国际标准" << _STDC_ISO_10646_ << endl;`
/*_func_预定义标识符,其基本功能是返回所在函数的名字,它对于轻量级调试代码具有十分重要的作用*/
cout << hello() << endl;
system("pause");
}
#include<string>
using namespace std;
const char* hello(){
/*本来执行下面的注释就可以了,但是vs2015中此函数不可用*/
//return _func_;
/*_func_实现的方式相当于下面的方式*/
static const char* _func_ = "hello";
return _func_;
}
int main()
{
/*c++11与c99兼容的宏下面的代码在VS2015中不可用*/
//cout << "包含完整的标准c库?" << __STDC_HOSTED__ << endl;
//cout << "编译器的实现是否和c标准一致?" << _STDC_ << endl;
//cout << "版本的国际标准" << _STDC_ISO_10646_ << endl;`
/*_func_预定义标识符,其基本功能是返回所在函数的名字,它对于轻量级调试代码具有十分重要的作用*/
cout << hello() << endl;
system("pause");
}