Home > DeveloperSection > Forums > How to create Constructor in C ?
Aaron Douglas
Aaron Douglas

Total Post:20

Points:140
Posted on    June-13-2013 7:06 AM

 Visual C++ Visual C++ 
Ratings:


 1 Reply(s)
 719  View(s)
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.  


AVADHESH PATEL

Total Post:604

Points:4228
Posted on    June-14-2013 2:05 AM

Try as following:

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

Don't want to miss updates? Please click the below button!

Follow MindStick