foo.cpp:7:1: warning: identifier 'constexpr' is a keyword in C++11 [-Wc++0x-compat]
constexpr int LIMIT = 30;
^
foo.cpp:52:5: warning: identifier 'nullptr' is a keyword in C++11 [-Wc++0x-compat]
long long num = strtoll(M.c_str(), nullptr, N);
^
foo.cpp:7:1: error: 'constexpr' does not name a type
constexpr int LIMIT = 30;
^
foo.cpp:7:1: note: C++11 'constexpr' only available with -std=c++11 or -std=gnu++11
foo.cpp: In function 'std::string transTo(std::string, int, int)':
foo.cpp:20:9: warning: 'auto' changes meaning in C++11; please remove it [-Wc++0x-compat]
for(auto i = num.rbegin(); i != num.rend(); ++i, ++idx)
^
foo.cpp:20:14: error: 'i' does not name a type
for(auto i = num.rbegin(); i != num.rend(); ++i, ++idx)
^
foo.cpp:20:32: error: expected ';' before 'i'
for(auto i = num.rbegin(); i != num.rend(); ++i, ++idx)
^
foo.cpp:20:32: error: 'i' was not declared in this scope
foo.cpp: In function 'bool isPalindrome(std::string)':
foo.cpp:35:5: warning: 'auto' changes meaning in C++11; please remove it [-Wc++0x-compat]
auto b = str.begin();
^
foo.cpp:35:10: error: 'b' does not name a type
auto b = str.begin();
^
foo.cpp:36:5: warning: 'auto' changes meaning in C++11; please remove it [-Wc++0x-compat]
auto e = str.end();--e;
^
foo.cpp:36:10: error: 'e' does not name a type
auto e = str.end();--e;
^
foo.cpp:36:26: error: 'e' was not declared in this scope
auto e = str.end();--e;
^
foo.cpp:37:11: error: 'b' was not declared in this scope
for(; b < e; ++b,--e)if(*b != *e)return false;
^
foo.cpp: In function 'int main()':
foo.cpp:52:40: error: 'nullptr' was not declared in this scope
long long num = strtoll(M.c_str(), nullptr, N);
^
foo.cpp:53:25: error: 'LIMIT' was not declared in this scope
for(int i = 1; i <= LIMIT; ++i)
^