+ 1
I do not understand clearly about class, I can't start more
I need more definition and usage for class PS I'm beginner for any language and I made self-study. Who want to share their knowledge Let's start
5 Respostas
+ 3
Imagine you to the beach and want to create a sand castle. You start putting sand and water then shape the mud until you get your castle. Or you can take a bucket that looks like castle, put the right amount of sand and water, put it upside-down and you got your self a castle. The bucket is your class, the sand and water are your class's constructor arguments, and putting it upside-down is the constructor body.
+ 1
In coding class is a kinda block containing variables and functions that doesn't get the memory
In real world, there several objects and those objects which share common properties like data and behavior (For example students are objects having same data like roll no. Subjects etc. And behavior like activities interest etc), we can define these properties by creating a class and can create different objects of that class
Each object will have different values and separate memory
+ 1
sorry for late reply bro
I can't understand that in early so I made hand note and read it. tks for your answer. Next one is coming. Why do we use class as header file .
Please
+ 1
This part is unique to C and C++. I am sorry I cannot answer that since I don't know C++ very well. You may post this specific question and I am sure someone will answer it.
+ 1
where can I get the notes for classes on the Internet?