Original Post
Question in comment inside code: Desired input:
class guy
{
public:
foo(int _a)
: a(_a)
{
}
get() //How to write that function so main() will input like shown below?
private:
int a;
}
int main()
{
guy(1553);
std::cout << guy.get(a); //Note it's not geta(), it's get(a), should work for any get(variable_name)
return 0;
}
Quote:
1553