I want to create a new data type called an inf_t. It's basically infinity (which for C++ is 1.7e+308). The only reason I want this is because I want to overload the cout << operation to print out INF/inf. Should I do this in a struct?
Code:struct inf_t { private: double inf = 1.7e+308; }; std::ostream& operator << (std::ostream &stream, inf_t inf) { stream << "INF"; return stream; }