Changed function return type still thinks its void.

Hi

I had a void function which I have now changed to
return an int but somehow the compiler still thinks
it is a void giving me "void value not ignored as it ought to be"
error. There is definitely no multiple definitions or anything.
I can even hover over the function and
CodeBlocks will show me it should return an int.
I have tried restarting both CodeBlocks and
my computer but to no avail. Has anybody seen this
sort of thing before?

Thanks
closed account (j2NvC542)
Please post the function.

Try rebuilding the project (Build -> Rebuild or CTRL+F11)
Code is long but here is some pseudocode

1
2
3
4
5
6
7
8
9
10
class A{
    public:
    virtual int Foo(){return 12;}
};


class B : public A{
   public:
   int Foo(){return 8;}
};
Topic archived. No new replies allowed.