This is my question
Define a class named HOUSING in C++ with the following descriptions:
REG_NO integer(Ranges 10 — 1000)
NAME Array of characters(String)
• Function Read_Data( ) to read an object of HOUSING type
• Function Display() to display the details of an object
• Function Draw Nos( ) to choose and display the details of 2 houses selected randomly from an array of 10 objects of type HOUSING Use random function to generate the registration nos. to match with REGNO from the array.
Now I' trying to do this by this way
I am tryin to pass the entire array of object in DrawNos(). but getting comilation error -
void housing::Read_Data( )
cout<<"Enter Registration No: ";
cout<<"Enter Name: ";
cout<<"Enter Type: ";
cout<<"Enter cost: ";
void housing::DrawNos(housing* h1)
h[i].DrawNos(h); // I am trying to pass the array of object to DrawNos function but getting error
What is the problem? How can I pass the array of object in function and use it.
rawNos(housing * *)' is not a member of 'housing'
48: Structure required on left side of . or .*
Please help me with this problem.