Click here to Skip to main content
15,927,694 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
Questionknowing the file's name Pin
tzumer11-Nov-07 1:45
tzumer11-Nov-07 1:45 
AnswerRe: knowing the file's name Pin
George L. Jackson11-Nov-07 2:59
George L. Jackson11-Nov-07 2:59 
AnswerRe: knowing the file's name Pin
Hamid_RT11-Nov-07 3:51
Hamid_RT11-Nov-07 3:51 
AnswerRe: knowing the file's name Pin
Jude Deng13-Nov-07 16:37
Jude Deng13-Nov-07 16:37 
Questionvalue -vs- ref class and NULL -vs- nullptr Pin
devvvy11-Nov-07 0:03
devvvy11-Nov-07 0:03 
AnswerRe: value -vs- ref class and NULL -vs- nullptr Pin
George L. Jackson11-Nov-07 2:48
George L. Jackson11-Nov-07 2:48 
GeneralRe: value -vs- ref class and NULL -vs- nullptr Pin
devvvy11-Nov-07 4:48
devvvy11-Nov-07 4:48 
GeneralRe: value -vs- ref class and NULL -vs- nullptr [modified] Pin
George L. Jackson11-Nov-07 5:54
George L. Jackson11-Nov-07 5:54 
devvvy wrote:
If there's an example... please? Also I tried NULL, compiler complained that it doesnt recongnise NULL:


NULL must be defined first: #define NULL 0.
NULL is defined in stdio.h as zero (0).

devvvy wrote:
Then what's the big fuss with "ref -vs- value"? I thought the primary difference is "ref class" is always allocated on managed heap. AND "value class" is always allocated on stack OR un-managed heap (BUT NEVER on managed-heap). Sounds like they don't need "ref" keyword? Or that by virtue of being a "ref class" the object can NEVER be allocated on stack or un-managed heap?

Is that what it is?


Value types (which includes value class) don't use constructors for default initialization. The value type's fields are initialized to zero (or nullptr if it is a managed handle). A value type can be copied by value with less overhead than a ref class. Value types can be stored and initialized with less overhead in an array or collection than a ref class. You can copy value types using only the equal sign.






-- modified at 20:52 Sunday 11th November, 2007

"We make a living by what we get, we make a life by what we give." --Winston Churchill

GeneralRe: value -vs- ref class and NULL -vs- nullptr Pin
devvvy11-Nov-07 13:26
devvvy11-Nov-07 13:26 
GeneralRe: value -vs- ref class and NULL -vs- nullptr Pin
George L. Jackson11-Nov-07 14:52
George L. Jackson11-Nov-07 14:52 
GeneralRe: value -vs- ref class and NULL -vs- nullptr Pin
George L. Jackson11-Nov-07 14:55
George L. Jackson11-Nov-07 14:55 
GeneralRe: value -vs- ref class and NULL -vs- nullptr Pin
devvvy11-Nov-07 16:27
devvvy11-Nov-07 16:27 
QuestionHow to define WaitCallback arguments? Pin
AlwaysStudent10-Nov-07 17:48
AlwaysStudent10-Nov-07 17:48 
AnswerRe: How to define WaitCallback arguments? Pin
Luc Pattyn10-Nov-07 18:30
sitebuilderLuc Pattyn10-Nov-07 18:30 
AnswerRe: How to define WaitCallback arguments? Pin
George L. Jackson11-Nov-07 3:22
George L. Jackson11-Nov-07 3:22 
GeneralRe: How to define WaitCallback arguments? Pin
AlwaysStudent11-Nov-07 20:41
AlwaysStudent11-Nov-07 20:41 
Questionconnecting 2 combo boxes Pin
Miss_F10-Nov-07 5:53
Miss_F10-Nov-07 5:53 
AnswerRe: connecting 2 combo boxes Pin
Mark Salsbery10-Nov-07 6:03
Mark Salsbery10-Nov-07 6:03 
AnswerRe: connecting 2 combo boxes Pin
Hamid_RT11-Nov-07 4:01
Hamid_RT11-Nov-07 4:01 
GeneralRe: connecting 2 combo boxes Pin
Miss_F11-Nov-07 17:46
Miss_F11-Nov-07 17:46 
GeneralRe: connecting 2 combo boxes Pin
Hamid_RT11-Nov-07 18:07
Hamid_RT11-Nov-07 18:07 
QuestionCan't find Excel Interop assembly Pin
BuckBrown9-Nov-07 8:29
BuckBrown9-Nov-07 8:29 
AnswerRe: Can't find Excel Interop assembly Pin
dtr19-Nov-07 11:52
dtr19-Nov-07 11:52 
QuestionVS 6 -> VS 2005 failed to include ON_EVENTS_ Pin
aschwarz9-Nov-07 4:58
aschwarz9-Nov-07 4:58 
AnswerRe: VS 6 -> VS 2005 failed to include ON_EVENTS_ Pin
led mike9-Nov-07 5:08
led mike9-Nov-07 5:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.