| | |
Stuipid Carrot Question
Please support our C++ advertiser: Intel Parallel Studio Home
Thread Solved |
After looking at compile errors because I was not overriding this function ( although being convinced that I was) I have a query for all you C++ buffs in the audiance. What does the ^ do in the following line.
I know this is quite possably a stupid question and for that I am quite sorry.
C++ Syntax (Toggle Plain Text)
virtual System::Object ^ Clone(void) override;
I know this is quite possably a stupid question and for that I am quite sorry.
As u said........ a caret [^] is a managed reference (usually called a handle in C++/CLI) is a reference to a managed .NET object. Managed object's lifetimes that are controlled by the .NET garbage collection system which needs to be able to track all references to managed objects. Having separate syntax for managed references / handles and regular native references helps makes this distinction explicit in the code and avoid confusion between managed / garbage collected .NET types and unmanaged native types whose lifetimes must still be managed explicitly by the programmer.
Some people get so rich they lose all respect for humanity. That's how rich I want to be.
![]() |
Other Threads in the C++ Forum
- Previous Thread: What does " this " mean in c++ class
- Next Thread: Linked Lists in multiple classes
| Thread Tools | Search this Thread |
api array arrays based beginner binary c++ c/c++ calculator char char* class classes code compile console conversion count delete deploy desktop directshow dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelp homeworkhelper iamthwee ifstream input int integer java lib linkedlist linker linux list loop looping loops map math matrix memory news numbertoword output parameter pointer problem program programming project proxy python random read recursion recursive reference return rpg sorting string strings struct temperature template templates test text text-file tree unix url variable vector video visual visualstudio win32 windows winsock wordfrequency wxwidgets





