I have a class object Interface that only has methods to receive the input from the keyboard and this object is created in main function and I want to use his methods in different objects... my question is where to declare the pointers to the object Interface and the easy way to call the methods whenever I want?
#include "Inicia.h"
int main(){
Interface interface;
Inicia i;
return 0;
}
one method of interface
string Interface::read_string( const string &mensagem )
{
string temp;
do
{
cout << mensagem;
cin >> temp;
} while( temp.size( ) == 0 );
return temp;
}

New Topic/Question
Reply




MultiQuote




|