manipulators are made from classes which are friends with an overloaded operator<<(). here's a simple example converting bool's to custom strings.
edit : You know what? Never code when it's past midnight and you have bags under your eyes!
Re-Post : manipulator code.
Code:
#include <iostream>
#include <string>
using namespace std;
class myManip
{
friend ostream& operator<< (ostream&, myManip&);
string out;
public:
myManip(bool b)
{
out=( b?"Yeah" : "Nah!" );
}
};
ostream& operator<< (ostream& os, myManip& mm)
{ return os<< mm.out; }
int main()
{
cout << myManip(true);
cin.get();
}