Copy structs with string members

Hi,

suppose to have to return a structured type from a method

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
struct TMyType
{
  LONG        Member1;
  INT         Member2;
  std::string Member3;
}

class MyClass
{
private:
  TMyType m_var;

public:
  void GetMyStruct( TMyType* var )
  {
    ...
  }
}


Is there a better way to fill var without to do a member-to-member copy?

Thanks.
Daniele
*var = m_var;

There's nothing easier than that.
Oh my God!!
Ssss...don't tell to anyone what I asked! :-P
Topic archived. No new replies allowed.