0

All,

I'm trying to understand the usage of the following:

struct out
{
  char msg<>;
};

If I try (intentionally):

struct out result;
result.msg=1;

I got the following:

error: incompatible types when assigning to type ‘struct <anonymous>’ from type ‘int’

I searched struct anonymous but all queries talk about something related to "Union". I'm really lost, appreciate if someone can clarify me the concept.

Thank you!

PS. I need it to return some message from an RPC Stateless Server.

Sergio
  • 155
  • 6
  • 2
    That struct isn't legit C..unless i'm missing something. It doesn't look like valid c++, either. – yamafontes Nov 21 '13 at 03:03
  • 1
    Are you trying to setup a [**flexible array member**](http://stackoverflow.com/questions/14643406/whats-the-need-of-array-with-zero-elements/14643530#14643530) ? If so, you're going to want a length member preceding that (and if you don't, you likely haven't thought this through). If you're not after a flexible member, I have no idea what you're doing. – WhozCraig Nov 21 '13 at 03:05

0 Answers0