You are on page 1of 1

#include<iostream>

#include<string>
using namespace std;
class person {

public:
string name;
int id;
person(){
cout<<"Student's info"<<endl;
};
person(string n , int i)
{
name=n;
id=i;
}

void display(){
cout<<"Name :"<<name<<endl;
cout<<"ID :"<<id<<endl;
}
};

int main() {
person object1, object1("Sadi al huda ", 20-43129-1);
object2.display();

return 0;
}

You might also like