Hey steemit and steemians.
I brought you a simple program of address database. keep in mind its a prototype program.
LETS BEGIN:
Program Body:
using namespace std;
int main(){
struct house{
int houseno;
string housename;
int streetno;
};
house ali,ahmed;
ali.houseno=887;
ali.housename="Sardar house";
ali.streetno=07;
ahmed.houseno=699;
ahmed.housename="Abbasi house";
ahmed.streetno=05;
int a;
cout<<"enter house number"<<endl;
cin>>a;
switch(a){
case 887:{
cout<<"house name is ="<<ali.housename<<endl;
cout<<"house number is ="<<ali.houseno<<endl;
cout<<"street number is ="<<ali.streetno<<endl;
break;
}
case 699:{
cout<<"house name is ="<<ahmed.housename<<endl;
cout<<"house number is ="<<ahmed.houseno<<endl;
cout<<"street number is ="<<ahmed.streetno<<endl;
break;
default:{
cout<<"not matched "<<endl;}
}
};
}
Limitations:
this program is very limited you just can access two house those are stored but storing more is no problem just gotta copy and change names and you are good to go.
Improvements:
I think I should place an option of crating an address, more options of a single address, convert this structure program to object oriented program.
Give me more suggestions how to improve in comment section below.
follow me @learnandgrow