Using references to access class objects C++
问题 This one has me stumped. What I'm trying to do is get a reference variable in a wrapper class to point to a struct object in the class it wraps so that any setting of variables in the struct from other classes that use the wrapper class, actually are set in the wrapped class not the wrappper class. To do this I tried to simply create a reference in the wrap class to the struct in the wrapped class like class CClassWrap { CClass::plot_type& PlotArgs; } and then init PlotArgs CClassWrap: