// An over-simplified version of // Metrowerk's C++ in BeOS DR8 does not have iostream. // By including this file, you get almost complete iostream functionality. // // That is, your code may contain something like // int d; double f; // cout << "Enter two numbers" << endl; cin >> d >> f; // cout << "The numbers are " << d << " and " << f << endl; // and it *will* work (with this iostream included), without _any_ changes // in your code... // Made at a Be Dev kitchen on Dec 13, 1996 (in 5 minutes) #include class IOSTREAM { }; static IOSTREAM cout, cin; class Endl {}; static Endl endl; class Manip {}; static Manip dec, hex; IOSTREAM& operator << (IOSTREAM& os, const char * str) { printf("%s",str); return os; } IOSTREAM& operator << (IOSTREAM& os, const int num) { printf("%d",num); return os; } IOSTREAM& operator << (IOSTREAM& os, const unsigned long num) { printf("%d",num); return os; } IOSTREAM& operator << (IOSTREAM& os, const long num) { printf("%d",num); return os; } IOSTREAM& operator << (IOSTREAM& os, const unsigned int num) { printf("%d",num); return os; } IOSTREAM& operator << (IOSTREAM& os, const float num) { printf("%g",num); return os; } IOSTREAM& operator << (IOSTREAM& os, const double num) { printf("%g",num); return os; } IOSTREAM& operator << (IOSTREAM& os, const Endl& _endl) { puts(""); return os; } IOSTREAM& operator << (IOSTREAM& os, const Manip& manip) { return os; } IOSTREAM& operator >> (IOSTREAM& os, int& num) { scanf("%d",&num); return os; }