HOW TO CREATE CONSTRUCTOR IN C ?

Aaron Douglas

Total Post:20

Points:140
Posted by  Aaron Douglas
 941  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. AVADHESH PATEL

    Post:604

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

    Try as following:

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

Answer

NEWSLETTER

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