C++ Constructor Overloading
Construction overloading is no different than simple overloading the function they are all most the same ,Lets follow the process first made simple constructor with no argument,Then made another constructor with 2 or more argument according to your requirement and as we know that for each object that we make in main body there is constructor called separately so now when we want to call 2 argument or more argument constructor that we have declared in class we will declare the object then after the object we will made the round bracket i.e () and we will enter the values that we want to pass with the following example it will be further cleared.
0 comments:
Post a Comment