__gc error


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: __gc error

  1. #1
    Join Date
    May 2005
    Posts
    5

    __gc error

    Im doing a .net library class in c++ and I have 2 classes, A y B; as follows:

    Code:
    public __gc class B;
    
    public __gc class A:public baseA
    {
       private:
    	B *entrada;
    	B *salida;
    };
    
    public __gc class B:public baseB
    {
       private:
    	A **entrantes;
    	A **salientes;
    };
    And I get the following error:
    Code:
    error C3160: 'entrantes' : no se puede declarar un puntero __gc interior ni una referencia como miembro de 'espacio_nombres::B'
    
    error C3160: 'salientes' : no se puede declarar un puntero __gc interior ni una referencia como miembro de 'espacio_nombres::B'
    How can I solve it? I need have in B these pointers to A...

  2. #2
    Join Date
    Nov 2003
    Posts
    4,118
    It's a Managed C++ hack, of which I know to little. However, you can try to wrokaround by delcaring real arrays of pointers instead of pointers to pointers. Alternatively, use a real container of pointers as data members. I don't know if STL vector is supported in this framework but there must be something similar.
    Danny Kalev

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center