main.cpp
hdr.hCode:#include <iostream> #include "hdr.h" using namespace std; int main() { cin.get(); return 0; }
hdr.cppCode:#ifndef HDR_H #define HDR_H class point { public: point(); void print(void); private: int x; int y; }; #endif
These files are in an empty devcpp project. Why can't i use cout in the hdr.cpp file? Thankyou for your time.Code:#include "hdr.h" point::point() { y = 0; x = 1; } void point::print(void) { //cout <<"TEST"; // cout is undeclared why? }