friend | Sololearn: Learn to code for FREE!

+1

friend

is this 'obj' keyword? It has not declared yet...

5/25/2020 7:17:09 PM

Kumudu_Mohottala

8 Answers

New Answer

+1

+1

"MyClass obj" is practicly the same as "int a" You can write everything instead of 'obj'. Examples: MyClass a, MyClass b, MyClass hello The name is just like a "variable" name but in this case it's an "object" name. (That's why they chose 'obj'->"object")

+1

Obj is not a predefined keyword . Explain your question in detail wht u want to ask

0

Kumudu_Laksitha Plz elaborate your question a bit more & link your stuff here Use suitable title for your question

0

I am talking about code in lesson friend second page

0

https://www.sololearn.com/learn/CPlusPlus/1899/

0

obj is just a parameter name. it could have been anything.

0

Its just variable name "MyClass &obj" in this case is same as "int &a" in some other...