0
How to stop obj getting created
I want to disable obj being created in below code Is there a way apart from setting one param constructor marked as delete ? This delete way would work but then i have to define two param constructor for other obj2 to work , which i dont dont to do.. https://code.sololearn.com/cpR4bR8CEsfR/?ref=app
4 Réponses
+ 4
Im not sure what you're asking about...
is this qhat you're looking for? : https://code.sololearn.com/c1hphz3hT1Bn/?ref=app
+ 1
Could not get you
+ 1
Partially yes
I want compile time error for obj creation and thats there
But to achieve so, i had to define constructor taking two arguments so that obj1 work... Is there other way to get compile time error for obj but i dont have to define any constructors for 2 parameeters