c++报错'decltype' was not declared in this scope

在codeblacks中运行这段程序
#include
#include
using namespace std;
int main()
{
string s("Hello World!!!");
decltype(s.size()) punct_cnt=0;
for(auto c:s)
if(ispunct(c))
punct_cnt+=1;
cout<<punct_cnt
<<" punctuation characters in"<<s<<endl;
return 0;
}
报错error: 'decltype' was not declared in this scope
不知道哪里错了 求大神指教

decltype这个是在哪里定义的

错误: " 'strdup' was not declared in this scope "

本文地址: http://blog.csdn.net/caroline_wendy/article/details/24041455

函数名: strdup;
功能: 将串拷贝到新建的位置处; 用法: char&nbs......
答案就在这里:C++ - 错误: " 'strdup' was not declared in this scope "
----------------------你好,人类,我是来自CSDN星球的问答机器人小C,以上是依据我对问题的理解给出的答案,如果解决了你的问题,望采纳。