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

Managed C++/CLI

 
AnswerRe: Instances of an object Pin
John Schroedl19-Mar-11 17:51
professionalJohn Schroedl19-Mar-11 17:51 
GeneralRe: Instances of an object Pin
John Schroedl19-Mar-11 18:01
professionalJohn Schroedl19-Mar-11 18:01 
GeneralRe: Instances of an object Pin
Cyclone_S20-Mar-11 9:56
Cyclone_S20-Mar-11 9:56 
AnswerRe: Instances of an object Pin
Luc Pattyn20-Mar-11 10:47
sitebuilderLuc Pattyn20-Mar-11 10:47 
GeneralRe: Instances of an object Pin
Cyclone_S20-Mar-11 14:47
Cyclone_S20-Mar-11 14:47 
AnswerRe: Instances of an object Pin
Luc Pattyn20-Mar-11 14:50
sitebuilderLuc Pattyn20-Mar-11 14:50 
GeneralRe: Instances of an object Pin
Cyclone_S20-Mar-11 15:30
Cyclone_S20-Mar-11 15:30 
GeneralRe: Instances of an object Pin
John Schroedl21-Mar-11 4:02
professionalJohn Schroedl21-Mar-11 4:02 
Let's start with #2:

The ^ character indicates a handle which is a reference to a managed object on the CLI heap.

The Wikipedia article isn't too good at explaining in my opinion: http://en.wikipedia.org/wiki/C%2B%2B/CLI#Handles[^] but you may want to look at it anyway.

This intro may be a bit friendlier: http://www.functionx.com/cppcli/handles/Lesson06c.htm[^]

For #1:

I'm creating a Predicate which is really just a function which returns True or False based on my own rules. Often predicates are used for sorting.

So my predicate function (IsMissileOffScreen) returns True if I see the missile has left the screen.

In RemoveAll, my predicate is called and passed one missile at a time as a parameter (the type of the parameter is missile^ which I indicate in the < > arguments. If I return True from IsMissileOffScreen, the RemoveAll() call will remove the missile from the Missiles list. So after this line, we're left with only on-screen missiles in the Missiles list.

Make sense?

John
GeneralRe: Instances of an object Pin
Cyclone_S21-Mar-11 15:44
Cyclone_S21-Mar-11 15:44 
GeneralRe: Instances of an object Pin
Cyclone_S23-Mar-11 13:21
Cyclone_S23-Mar-11 13:21 
AnswerRe: Instances of an object Pin
Luc Pattyn23-Mar-11 16:01
sitebuilderLuc Pattyn23-Mar-11 16:01 
GeneralRe: Instances of an object Pin
John Schroedl23-Mar-11 18:22
professionalJohn Schroedl23-Mar-11 18:22 
GeneralRe: Instances of an object Pin
Cyclone_S25-Mar-11 14:31
Cyclone_S25-Mar-11 14:31 
GeneralRe: Instances of an object Pin
Cyclone_S26-Mar-11 9:38
Cyclone_S26-Mar-11 9:38 
Questionreturn 2 HWND Pin
Masternoob00718-Mar-11 1:19
Masternoob00718-Mar-11 1:19 
AnswerRe: return 2 HWND Pin
Richard MacCutchan18-Mar-11 2:50
mveRichard MacCutchan18-Mar-11 2:50 
Question[C++/CLI] Progressbar doesn't work [modified] Pin
Masternoob00716-Mar-11 2:08
Masternoob00716-Mar-11 2:08 
AnswerRe: [C++/CLI] Progressbar doesn't work Pin
Luc Pattyn16-Mar-11 2:27
sitebuilderLuc Pattyn16-Mar-11 2:27 
GeneralRe: [C++/CLI] Progressbar doesn't work Pin
Masternoob00716-Mar-11 2:37
Masternoob00716-Mar-11 2:37 
Questionproblem in using library of LFSR Pin
smishtiaqhussain12-Mar-11 9:24
smishtiaqhussain12-Mar-11 9:24 
AnswerRe: problem in using library of LFSR Pin
Richard MacCutchan12-Mar-11 9:48
mveRichard MacCutchan12-Mar-11 9:48 
GeneralRe: problem in using library of LFSR Pin
smishtiaqhussain12-Mar-11 10:49
smishtiaqhussain12-Mar-11 10:49 
GeneralRe: problem in using library of LFSR Pin
Richard MacCutchan12-Mar-11 22:29
mveRichard MacCutchan12-Mar-11 22:29 
AnswerRe: problem in using library of LFSR Pin
Luc Pattyn12-Mar-11 9:59
sitebuilderLuc Pattyn12-Mar-11 9:59 
GeneralRe: problem in using library of LFSR Pin
jschell13-Mar-11 10:14
jschell13-Mar-11 10:14 

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.