Hi friends! I would like to do something but I have a big doubts.
I am making this thing:
I have an interface named I that contains the (template) method run() like this
template <class T> run()
.
I have two classes CI1 and CI2 that implements this interface I. I would like that run() of CI1 returns a list of some class objects and run() of CI2 returns a void.
Is this coherent ?
I am very beginner in c++. Then I need help , Can someone help ?
to override methods it needs to be virtual but template functions can't be virtual
you could either make use of CRTP or the pimpl idiom, depending on what you are trying to achieve
olli
Trevor
Morgan
MᏫᎻᎯᎷᎷᎬᎠ
Nomid Íkorni-Sciurus
klimi
우빈(KR)
Liam