What are main difrences between * ^ and & in visual-C++ 2010?
What are main difrences between * ^ and & in visual-C++ 2010?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
^ was introduced in C++/CLI for managed objects reference, replacing the * sign used for native object pointers. So, having two types, managed and native, you need to write:
class Native { }; ref class Managed { }; Native* pn = new Native(); Managed^ pm = gcnew Managed();& may be used to get native pointer from the native class instance. It is not used by the same way for managed classes, which are accessed only using reference.