time.h:22: error: ISO C++ forbids declaration of 'istream' with no type
time.h:22: error: 'istream' is neither function nor member function; cannot be declared friend
time.h:22: error: expected ';' before '&' token
The code it's referencing is a public function definition:
Expand|Select|Wrap|Line Numbers
- #include <iostream>
- class Time
- {
- private:
- int hour, minute;
- bool am;
- Time() {};
- friend class Appointment;
- public:
- Time(int, int, bool);
- int getHour();
- int getMinute();
- bool isAM();
- bool operator<(Time);
- friend istream& operator>>(istream& istr, Time t);
- };
Thanks in advance for any help, and let me know if more info is needed.