declaration can't solve the overloaded address function - compiler error

Hello everyone, I have the following line, as I understood in the examples, I should be able to write this, but I got a compile error.

1
2
3
4
5
6
7
8
9
using namespace std; 

        vector<SDL_Rect>clip;

        // here I did the push_back

        virtual ~Sprite(){clips.clear;}

        


gcc/g++ version 4.6.3
Ubuntu 12.04

Do I need to set some compiler options?

Thanks and regards.

rossig
I assume you just forgot the () when calling a function in line 7.
There is no point in clearing a member vector in the destructor, by the way. The vector does that itself when it is destroyed.
Athar, you're right, thanks for your tip anyway. I was trying actually, I need to clear the vector in another part of the code to set new values. (I have pointers that need to be freed).


KRAcatau, you were right, I forgot the () and that caused the error.

Thank to both.

greets, rossig
Topic archived. No new replies allowed.