how is code called

Please excuse the crazy amateur question but; this code is executing:
1
2
3
4
5
6
string
ldu1::duid_str() const
{  
   cout << "duid func LDU1";
   return string("LDU1");
}


I thought this is a definition. how is the function called?
Not sure, i probably shouldn't answer if I'm not sure.. but maybe that's a default constructor that's part of a class? Haha, like I said.. I'm probably wrong.. but just an idea.
heres the constructor:
1
2
3
4
ldu1::ldu1(const_bit_queue& frame_body) :
   voice_data_unit(frame_body)
{
}

its a public function. so is it possible that, somewhere in the family tree that this class is derived from, there is a call to this function that i have not found? that has to be it right?
Somewhere in the main program, an object of the class is making a call to the member function. That would be my guess.. it's hard to tell without the code. it might be possible you have a member funtion call in a member function, though.
I thought this is a definition. how is the function called?
Like so:
1
2
3
4
5
...
ldu1 x;
...
string y = x.duid_str();
...
Topic archived. No new replies allowed.