Following does not work:

```
std::vector<IRule*> vec;
RuleRangeDouble *rule = new RuleRangeDouble(0, 100);
vec.push_back(rule);

```

Now how can a make a vector of different rules? I know, I have to use pointers... But what else do I have to do to get this working? How can I change my base structure to get this work?

I use an Interface like the following:

```
// Interface
    template <typename T>
    class IRule
    {
        public:
            virtual bool isValid(T value) = 0;
    };

```

And my example class looks like this:

```
class RuleRangeDouble : public IRule<double>
    {
        private:
            double min;
            double max;
        public:

            bool isValid(double value)
            {
....
            };
    };

```