+ 3

Class

Why is it so hard to understand class, especially when it comes to coding game with it...

27th Oct 2018, 12:45 PM
Habeeb Tijani
Habeeb Tijani - avatar
2 Answers
+ 3
if you know about structure and union in c, then you can easily understand the concept of class. class is a blueprint from which objects are created. you have to practice more and more , this is the only way, so best of luck .
27th Oct 2018, 2:03 PM
Shruti
Shruti - avatar
+ 2
Why does it make a difference if it's for a game or not? Classes are a tool you can use whenever you feel it helps your mission, just like variables or loops or whatever. You only need to first understand that tool. Like functions. They are pieces of code that do a defined task, and you can call them as often as you want, from any place in your code. And when would you need such a thing? When you have to do a task several times and don't want to write the same code several times. So what are classes even good for? What is their job? How do they help making your code shorter, clearer, better to read?
27th Oct 2018, 6:11 PM
HonFu
HonFu - avatar