Object of Simple Person


Object of Simple Person:

An object of a simple person with some attributes and behaviors are defined here in this post.
You can also Download the code of this program easily at the end of the article.

Object of Simple Person(Code)

#include<iostream>
#include<string>
using namespace std;
class person{
//attributes
string name;
float age;
string reg;
//behaviour
public:
void inputdetail(){
cin>>name>>age>>reg;

}
void displaydetail(){
cout<<name<<" "<<age<<" "<<reg<<" "<<endl;
}

};
Go to below to get full code
_________________________________________________________________________________
Object of Simple Person
_________________________________________________________________________________

Download:

To download this program click on the given link below:

Comments

Popular posts from this blog

How to Run Assembly Language Programming Code In Visual Studio 2019

How to Display Table of any Number in Assembly Language

How to Display Character in Assembly language