C++ examples for Class:Custom Literal
Developing a conversion user-defined-literal
#include <iostream> using namespace std; constexpr long double operator"" _circ ( long double radius ) { return radius*radius*3.141592; } int main()//from w ww.j a v a2s . com { double x = 5.0_circ; cout << "The circle's area is: " << x << endl; return 0; }