C++ examples for Class:Custom Literal
Using a custom user-defined-literal for side effects
#include <iostream> using namespace std; void operator"" _countdown (unsigned long long Value) { for (int i = Value; i >= 0; i--) cout << i << endl; /*from w ww.ja va2 s.com*/ } int main() { 10_countdown; return 0; }