Having structure
struct Person{
   Person(int a , int i):age(a),id(i){};
   int age;
   int id;
}
Is it possible to pass which argument to exctract as argument in function? Something like
int extract( Person * p , param ){
    return p -> param;
} 
which would return id , if used it like
extract( p , "id" )
and age if i used it like
exctract(p , "age")
Is something like this possible in c++?
 
     
     
     
    