CLI Array of pointers to managed classes RRS feed

  • Question

  • I have a managed class named "Competition" in a program I am writing in C++. In a class called "Team" I need to create a Collections.Generic.List of pointers to Competition. The line:

    List<interior_ptr<Competition^>>^ Competitions;

    gives "error C3225: generic type argument for 'T' cannot be 'cli::interior_ptr<Type>', it must be a value type or a handle to a reference type.

    I can't find any alternatives to this that do what I want. I can't use a native array because the size of it will be constantly changing, and it must be a pointer to type Competition, not actual objects. I don't know what to do.
    Monday, March 23, 2009 12:26 AM


All replies