saving . . . saved Syntax not clear has been deleted. Syntax not clear has been hidden .
Syntax not clear
Title
Question
Dear Sir/Ma'am,

What if in the same code, instead of creating the object as "Substraction s", I create the object like "Substraction s()"

Regards,
Abu.

Advanced-Cpp Constructor-And-Destructor 04-05 min 30-40 sec 04-02-25, 4:03 p.m. abu.muttalib@gmail.com

Answers:


Writing Substraction s; correctly creates an object named s.

But writing Substraction s(); doesn’t create an object — it declares a function named s that returns a Substraction object (known as the Most Vexing Parse in C++).

So always use Substraction s; to create the object properly.


14-07-25, 12:18 p.m. 240181601063@crescent.education


Log-in to answer to this question.