How to call other class functions from another class
-
Hi:I try to call function from other classes in here and get some problem. All the necessary include files I put already. I have the following functions that I want to call on other class. MY QUESTION IS HOW TO IMPLEMENT THESE FUNCTIONS ON OTHER CLASS... SEE MY PSEUDOCODE.... I try some of them but mostly not working. 1) istream& loser.ReadFrom(istream& in, char* format ) ; --->read from cin 2) bool Ticket::Search( int* array, int item ,int elementsInArray );--> search how many balls are matched 3) Ticket HistoryFile::GetMatch( Ticket& searchItem ); --> see if the date of cin and from the file is match the pseudocode to call those functions to other class: read from cin -->istream& loser.ReadFrom(istream& in, char* format ) see if the date match --> Ticket HistoryFile::GetMatch( Ticket& searchItem); if date on cin & date on file is same ---->if (ticket == ticket &); match how many balls are match -->bool Ticket::Search( int* array, int item ,int elementsInArray ); cout << "You match : " << ;else null ticket ---> ticket.ticket( );endifThe following is my code: void Pureluck::Run( ){ istream& loser.ReadFrom( ); --> //will give me this error Error: PURELUCK.H(92,24):Too few parameters in call to 'Ticket::ReadFrom(istream &,char *)' then if I put --> loser.ReadFrom(istream &, char * ); //---> will give me this errorError: PURELUCK.H(92,29):Improper use of typedef 'istream' all the rest of message are mostly: Expression syntax. winners.GetMatch( loser& searchItem ); //search for match date if (ticket == searchItem) // if found match { Ticket::Search( int* array, int item ,int elementsInArray )//find out how many match } else { Ticket::Ticket( ); //not found become null ticket } endif; */}//endfn RunPlease let me knowThank's