I receive a warning from the cpp compiler which I can't seem to resolve. I'd like to at least understand what I am doing wrong...
sketch\IRectangle.h:7:20: warning: ISO C++ forbids declaration of 'Rectangle' with no type [-fpermissive]
Rectangle(int,int);
^
Header file
#ifndef RECTANGLE_H
#define RECTANGLE_H
class IRectangle
{
public:
Rectangle(int,int);
void set_values (int,int);
int area (void);
private:
int width, height;
};
#endif
The Rectangle implementation
#include "IRectangle.h"
IRectangle::Rectangle(int width, int height)
{
}
void IRectangle::set_values (int a,int b)
{
}
int IRectangle::area()
{
return 0;
}
After googling I ran into this and this thread but I triple checked if the prototypes match, so I really can't figure out what I am doing wrong.
PS: is it OK to prefix interface with 'I' in C++?