Hello, after writing this class I had some kind of error that said.. Error: PCH Warning: header stop cannot be in a macro or #if block. An intellisense PCH file was not generated.
This is the class I wrote:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#ifndef CIRCLE
#define CIRCLE
class Circle
{
private:
double radius;
public:
void setRadius(double r)
{ radius = r; }
double getRadius() const
{ return radius; }
double getArea() const
{ return (3.14159 * radius * radius); }
};
#endif
Is there something wrong with the way I wrote this?
If this is your header file, are you sure it is included somewhere? In Visual Studio, if you create a header file in a project, but don't include it in any of your c(pp) files, you get this error.
It might also be a bug introduced by service pack 1 (according to what a Microsoft tech said).
Both ways, however, you should be fine, it will just result in a slightly slower IntelliSense.