0

What is class in simple way, can anybody explain me please

7th May 2020, 2:39 AM
Raj Singhal
Raj Singhal - avatar
9 Answers
+ 4
"Objects are created using classes, which are actually the focal point of OOP. The class describes what the object will be, but is separate from the object itself. In other words, a class can be described as an object's blueprint, description, or definition. You can use the same class as a blueprint for creating multiple different objects..." Source: https://www.sololearn.com/learn/CPlusPlus/1710/?ref=app Don't forget to check the comments section for creative answers.
7th May 2020, 2:45 AM
Kevin ★
+ 2
Raj Singhal Creates a new object ("test") of type BankAccount(yes classes are called types sometimes). Then uses dot notation to call its public method. Remember to open a new question next time. AYUSH.ks It's ok. It's better to master one than just knowing the basics of many.
7th May 2020, 3:01 AM
Kevin ★
+ 2
We use " class " to create user defined data types that hold data according to our requirement's. Example:- int x; Here 'x' is an integer variable that hold integer values ( like -7,-2,-9,0,3,1 ........etc) Similarly class country{ String name; int Population; string getName( return name ) } Country c1; Here Country is an user defined data typed "c1" is an object of Country that holds " name and population"
7th May 2020, 3:54 AM
Dasarath Singh
+ 1
Sorry bro I can't. I use to study python and java in detail. you may contact with any another person who is good enough to explain you c++
7th May 2020, 2:58 AM
Ayush Kumar
Ayush Kumar - avatar
0
Thanks bro... Can you explain this code #include <iostream> using namespace std; class BankAccount { public: void sayHi() { cout << "Hi" << endl; } }; int main() { BankAccount test; test.sayHi(); }
7th May 2020, 2:52 AM
Raj Singhal
Raj Singhal - avatar
0
The part after int main
7th May 2020, 2:54 AM
Raj Singhal
Raj Singhal - avatar
0
Ok
7th May 2020, 2:58 AM
Raj Singhal
Raj Singhal - avatar
0
đŸ€˜đŸ‘
7th May 2020, 3:03 AM
Raj Singhal
Raj Singhal - avatar