Chuyên mục

Buckys C++ Programming Tutorials – 55 – Introduction to Polymorphism

Rate this post

Website –
GitHub –
Reddit –
Twitter –
Facebook –
LinkedIn –
Instagram –

Tag: polymorphism c++, tutorial, beginners, game, class, program, pointers, lesson, thenewboston, bucky, roberts, computer, string, vector, download

Xem thêm:


33 trả lời trong “Buckys C++ Programming Tutorials – 55 – Introduction to Polymorphism”

i have been following your tutorials and just wanted to jump right next to polymirphism ffrom thestructures lecture, but i really hoped you had not used pointers to help learners learn polymorphism, passing by address is a bit confusing which couldnt help , you could have used the normal calling of a function and assigning it to an object which you created in the main function . but all in all , these tutorials have really helped me ,

you called n.attack( ) and m.attack( ). This doesn't show that the code knew which attack to call. Cz you're literally telling the code which attack to call. You should've called attack to the e1 like e1->attack( ). That would show the intelligence of the code to know which attack to call. But for that you need to make a virtual attack( ) in enemy.

Trả lời

Email của bạn sẽ không được hiển thị công khai.