HOW TO CREATE CONSTRUCTOR IN C ?

Total Post:20

Points:140
 1175  View(s)
Ratings:
Rate this:
Hi Expert,

I'm beginner in language (C++) . I'm have created some example for learning point of view. Can you tell me how to create constructor in C++ language? Please provide me line of code.

Your help is greatly appreciated.  
  1. Post:604

    Points:4228
    Re: How to create Constructor in C ?

    Try as following:

    class myclass{
    public:
    myclass( );
    };
    myclass::myclass( )
    {
    cout<<"In constructor\n";
    }

      Modified On Mar-30-2018 03:37:36 AM

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!