J
James Egan
In the example below, I'm trying to call the
GetInput::GetAddress() function in main()
which is a function in the class "GetInput".
What am I missing? I thought all I had to do
was instantiate the class with something like
"GetInput gi" then use gi.GetAddress().
-Thanks
#include <fstream>
#include <iostream>
#include <string>
using namespace std;
class GetInput {
public:
GetInput();
~GetInput();
void GetInput::GetAddress() {
//Do something here
}
};
int main()
{
GetInput gi;
//GetInput.GetAddress();
//gi.GetAddress();
return 0;
}
GetInput::GetAddress() function in main()
which is a function in the class "GetInput".
What am I missing? I thought all I had to do
was instantiate the class with something like
"GetInput gi" then use gi.GetAddress().
-Thanks
#include <fstream>
#include <iostream>
#include <string>
using namespace std;
class GetInput {
public:
GetInput();
~GetInput();
void GetInput::GetAddress() {
//Do something here
}
};
int main()
{
GetInput gi;
//GetInput.GetAddress();
//gi.GetAddress();
return 0;
}