How to avoid a class from instantiation?
Answer Posted / ravi
We can aviod a class from instantiation by making all
variants of constructors as private. We can provide user
defined function like create member function under public
scope and call this private construcotrs from this create
function to create an object for that class.
| Is This Answer Correct ? | 3 Yes | 5 No |
Post New Answer View All Answers
Assume studentNames and studentIDs are two parallel arrays of size N that hold student data. Write a pseudocode algorithm that sorts studentIDs array in ascending ID number order such that the two arrays remain parallel.
How can we read/write Structures from/to data files?
What is a volatile variable in c++?
Is empty stack c++?
Differentiate between an array and a list?
What is ios in c++?
Write about the scope resolution operator?
What is a literal in c++?
what is C++ objects?
Why do we use double in c++?
How do you find out if a linked-list has an end?
What is a class template in c++?
Differentiate between the message and method in c++?
Define upcasting.
What number of digits that can be accuratly stored in a float (based on the IEEE Standard 754)? a) 6 b) 38 c) An unlimited number