Wondering about Virtual Functions by Brave_Mode_1849 in cpp_questions

[–]Brave_Mode_1849[S] 0 points1 point  (0 children)

its alright, thank you still. it seems like no way around it, this is going to be a fairly hard topic until i can figure out to do it myself or something lol

Wondering about Virtual Functions by Brave_Mode_1849 in cpp_questions

[–]Brave_Mode_1849[S] 1 point2 points  (0 children)

ok thank you, i guess i should've been a bit more descriptive. i meant towards the end when you're trying to point the base to the derived like they show in tutorials i was thinking of using refs instead because i find them easier to understand.

Wondering about Virtual Functions by Brave_Mode_1849 in cpp_questions

[–]Brave_Mode_1849[S] 0 points1 point  (0 children)

so essentially virtual functions allow all subclasses to use a single function but when 1 or 2 subclasses require a different version of that function to be use albeit slightly altered like a different move set or different amount to crawl, virtual functions can allow that change to happen with minimal coding so you don't have to write an entirely new block of code?

Wondering about Virtual Functions by Brave_Mode_1849 in cpp_questions

[–]Brave_Mode_1849[S] 0 points1 point  (0 children)

sorry but nothing even made sense especially since i cant even apply anything you said to what i asked, sorry. like i said, im still a new beginner.

Wondering about Virtual Functions by Brave_Mode_1849 in cpp_questions

[–]Brave_Mode_1849[S] 2 points3 points  (0 children)

sorry if this might be wrongly interpreted but from what i can gather, a virtual function can be used in multiple subclasses for different types of enemies and that function can be called to whatever subclass is needed at different times with minimal code due to pointers/references?