[Solved] Problem with declaring a protected pointer to a vector


The problem wasn’t the c++ code itself, but the framework it used, in this case ROOT. If you define a pointer in a ROOT class, you have to tell the program what to do with that pointer in the case of the class being written to file. Even though the class might never be written to a file (like in my case).
In this specific case (class never being written to a file), you can simply tell ROOT to ignore the given pointer by adding //! after the declaration, e.g. write

protected:
   std::vector<CustomClass> *mypointer; //!

Thanks to everyone for helping in this helpless case!

solved Problem with declaring a protected pointer to a vector