i have two functions here.i have declared two loops in function but i don't know how to print these loops value in another function.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
void houseInfo::getdata()
{
cout<<"enter the house entires"<<endl;
for(int i=0;i<3; i++){
cin>>avalible[i];
}
cout<<"enter the prices"<<endl;
for(int j=0;j<3; j++)
{
cin>>prices[j];
}}
void houseInfo::display()
{
cout<<"The entries of house are"<<avalible[]<<endl;
cout<<"the price of house is"<<price;
//i am confused here,i and j is giving error.becuse i and j are out of scope.what i should add instead of i and j here?