I am new to c++. In a tutorial i was reading about auto
and decltype
and tried the following:
#include <iostream>
using namespace std;
int foo = 0;
decltype(foo) bar;
bar = 22;
int main(){
cout<<foo;
cout<<bar;
}
and i get this error upon compilation:
tst.cpp.6:1: warning: identifier 'decltype' is a keyword in C++11
Why is this happening?