E
enki
I was reading a book on game programming and they were explaining a
game engine class and they say that correct OO programming is making
base calss functions virtual. I am been reading and larning about C++,
and from what I have been told here is that you should use the right
tool for the right job.
What I have gathered is that I should use virtual functions and dynamic
binding if I want to create similar objects that can be stored in the
same array or container. Such as shape drawing or having different
account types calcuate intrest different.
I have also learned that I should not alwasy believe what I read in
books.
Are virtual functiontions and dynamic binding correct OO programing
practice?
game engine class and they say that correct OO programming is making
base calss functions virtual. I am been reading and larning about C++,
and from what I have been told here is that you should use the right
tool for the right job.
What I have gathered is that I should use virtual functions and dynamic
binding if I want to create similar objects that can be stored in the
same array or container. Such as shape drawing or having different
account types calcuate intrest different.
I have also learned that I should not alwasy believe what I read in
books.
Are virtual functiontions and dynamic binding correct OO programing
practice?