without any class being modified to accept those parameters?
without any class being modified to accept those parameters?
I believe you can. Try it. I know for sure that you can pass a derived class to a function where the parameter expects a base class, so why not?
Current Setup: Win 10 with Code::Blocks 17.12 (GNU GCC)
I DOnt Think So.
Im assuming you are using protected variables. If it is a common varaible to both the base class and the derived class then yeah it should probably work. Otherwise, trying to assign a derived class variable to a non-existant variable in a base class would be invalid.
That's what I meant. I've never tried it, but it seems logical that you could do it. C++ still manages to surprise me with its flexibility sometimes.
Current Setup: Win 10 with Code::Blocks 17.12 (GNU GCC)