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