Please cut and paste for your example code, so we can be sure that you
mean what it looks like.
Your example looks like:
class Vector {};
struct {
Vector col0;
Vector col1;
Vector col2;
Vector col3;
};
If your struct is expected to be a type declaration, it can not be
anonymous, but must be given a name. How else are you going to declare a
variable of that type?
If you where planning on directly define a variable of the struct type:
struct {
Vector col0;
Vector col1;
Vector col2;
Vector col3;
} var;
then the compiler has an "anchor" to use for constructing the variable of
the anonymous data type.
/pwm
On Tue, 17 Jul 2007, anand wrote:
> Hi all,
>
> I am doing some porting work where I got one anonymous struct as
> Namespace adc
> {
>
> Class Vector
> {
>
> }
>
> struct
> {
> Vector col0; //here I am gettng error
> Vector col1;
> Vector col2;
> Vector col3;
> };
> }
>
> I am getting error as
>
> 1012: error: member ' adc::Vector adc::Matrix::<anonymous struct>::col0'
> with constructor not allowed in anonymous aggregate
>
>
> Can some one tell me how to solve this:(
>
> Thanks in Advance
> Anand
>
>
>
> -----------------------------------------------
> Robosoft Technologies - Come home to Technology
>
> Disclaimer: This email may contain confidential material. If you were not an intended recipient, please notify the sender and delete all copies. Emails to and from our network may be logged and monitored. This email and its attachments are scanned for virus by our scanners and are believed to be safe. However, no warranty is given that this email is free of malicious content or virus.
>
>
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
|