Retrieving member data from const pass by reference.

I have a strictly C background and have been scrambling to pick up C++ as I have just been switched to a C++ project and have run into some confusion in utilizing a hook provided by a library I'm using.

Base class from library contains

virtual void eventHook(const someStructure& /*dataStructure*/);

as a public method, and there is a call to the method in the library code which passes in a pointer to a function that returns a reference to a struct. Something like that.

Here is my application code where I want to react to the event. All I want to do is retrieve the value of one of the members of the struct.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
class DerivedClass : public SomeSpace::BaseClass
{
  virtual void eventHook(const someStructure& /*dataStructure*/);

public:
	DerivedClass (void);
	DerivedClass (void);
};

void
DerivedClass::eventHook(const someStructure &dataStructure)
{
  // I want to read data here
}
Well, nevermind I figured it out. I can access the members of the struct normally. It was just because of a forward declaration of the structure in question that was preventing IntelliSense from seeing them. Compiler accepted it all just fine.
Topic archived. No new replies allowed.