Declaring a managed class member in an unmanaged class

Posted on 2004-11-10
Medium Priority
Last Modified: 2013-12-03

I am new to the Managed C++,I have created a namespace "N" with "Cl" class in that name space.

Now I want to use this "Cl" as a data memeber in an unmanaged C++ class.
The syntax I used in Unmanaged c++ class header is as follows..
class Unmanged
Cl *m_Managed;

The reported error is..
error C3265: cannot declare a managed 'm_Managed' in an unmanaged 'Unmanaged'

Can anyone please let me a way out for this?

Question by:l_madhavi
1 Comment
LVL 48

Accepted Solution

AlexFM earned 100 total points
ID: 12552800
class Unmanged
    gcroot<Cl*> m_Managed;


Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question