Simple Constructor Program in C++


 

#include<iostream.h>

#include<conio.h>

class car

{

public:

car( )

{

cout<<"hello student";

}

};

int main()

{

car a;

getch();

return 0;

}


To run :













Output:



No comments:

Post a Comment

theengineerschoice01@gmail.com