#include <iostream>int main(){ #if 1 auto number = 0ULL;// xFFFFFFFFULL;#else auto number = 0xFFFFFFFFFFFFULL;#endif const auto last = number + (1ULL<<34); for(auto i=number; i <= last; ++i){ number += i; } std::cout << number << std::endl; }
Standard input is empty
prog.cpp: In function ‘int main()’: prog.cpp:4: error: ISO C++ forbids declaration of ‘number’ with no type prog.cpp:8: error: ISO C++ forbids declaration of ‘last’ with no type prog.cpp:9: error: ISO C++ forbids declaration of ‘i’ with no type
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!