The OMANIP macro works with ostream and its derived classes. The SMANIP, IMANIP, and IOMANIP macros work with the classes ios, istream, and iostream, respectively.