Having trouble getting my header file to compile correctly.
Getting a compile error ofCode:#ifndef Rectangle_h #define Rectangle_h class Rectangle { public: double avgPerimeter; double avgArea,count; //count used a a counter to keep track of number of times i've computed the perimeter and area. double x,y,h,w; double Area, Perimeter; Rectangle(); double getPerimeter(); double getArea(); friend ostream& operator<<(ostream& outputStream, Rectangle& z); friend istream& operator>>(istream& inputStream, Rectangle& z); private: char color[]; }; #endif
ISO C++ forbids declaration of 'ostream' with no type'ostream' is neither function nor member function; cannot be declared friendIt is also saying the same thing with the istream. I'm not sure where to go from here, this code was working till I broke off the code to a header file. Well it was working when all of my code was in the same file.expected ';' before '&' token



LinkBack URL
About LinkBacks


