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

Managed C++/CLI

 
AnswerRe: Instances of an object Pin
John Schroedl19-Mar-11 18:51
professionalJohn Schroedl19-Mar-11 18:51 
GeneralRe: Instances of an object Pin
John Schroedl19-Mar-11 19:01
professionalJohn Schroedl19-Mar-11 19:01 
GeneralRe: Instances of an object Pin
Cyclone_S20-Mar-11 10:56
Cyclone_S20-Mar-11 10:56 
AnswerRe: Instances of an object Pin
Luc Pattyn20-Mar-11 11:47
sitebuilderLuc Pattyn20-Mar-11 11:47 
GeneralRe: Instances of an object Pin
Cyclone_S20-Mar-11 15:47
Cyclone_S20-Mar-11 15:47 
AnswerRe: Instances of an object Pin
Luc Pattyn20-Mar-11 15:50
sitebuilderLuc Pattyn20-Mar-11 15:50 
GeneralRe: Instances of an object Pin
Cyclone_S20-Mar-11 16:30
Cyclone_S20-Mar-11 16:30 
GeneralRe: Instances of an object Pin
John Schroedl21-Mar-11 5:02
professionalJohn Schroedl21-Mar-11 5: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 16:44
Cyclone_S21-Mar-11 16:44 
GeneralRe: Instances of an object Pin
Cyclone_S23-Mar-11 14:21
Cyclone_S23-Mar-11 14:21 
AnswerRe: Instances of an object Pin
Luc Pattyn23-Mar-11 17:01
sitebuilderLuc Pattyn23-Mar-11 17:01 
GeneralRe: Instances of an object Pin
John Schroedl23-Mar-11 19:22
professionalJohn Schroedl23-Mar-11 19:22 
GeneralRe: Instances of an object Pin
Cyclone_S25-Mar-11 15:31
Cyclone_S25-Mar-11 15:31 
GeneralRe: Instances of an object Pin
Cyclone_S26-Mar-11 10:38
Cyclone_S26-Mar-11 10:38 
Questionreturn 2 HWND Pin
Masternoob00718-Mar-11 2:19
Masternoob00718-Mar-11 2:19 
AnswerRe: return 2 HWND Pin
Richard MacCutchan18-Mar-11 3:50
mveRichard MacCutchan18-Mar-11 3:50 
Question[C++/CLI] Progressbar doesn't work [modified] Pin
Masternoob00716-Mar-11 3:08
Masternoob00716-Mar-11 3:08 
AnswerRe: [C++/CLI] Progressbar doesn't work Pin
Luc Pattyn16-Mar-11 3:27
sitebuilderLuc Pattyn16-Mar-11 3:27 
GeneralRe: [C++/CLI] Progressbar doesn't work Pin
Masternoob00716-Mar-11 3:37
Masternoob00716-Mar-11 3:37 
Questionproblem in using library of LFSR Pin
smishtiaqhussain12-Mar-11 10:24
smishtiaqhussain12-Mar-11 10:24 
AnswerRe: problem in using library of LFSR Pin
Richard MacCutchan12-Mar-11 10:48
mveRichard MacCutchan12-Mar-11 10:48 
GeneralRe: problem in using library of LFSR Pin
smishtiaqhussain12-Mar-11 11:49
smishtiaqhussain12-Mar-11 11:49 
GeneralRe: problem in using library of LFSR Pin
Richard MacCutchan12-Mar-11 23:29
mveRichard MacCutchan12-Mar-11 23:29 
AnswerRe: problem in using library of LFSR Pin
Luc Pattyn12-Mar-11 10:59
sitebuilderLuc Pattyn12-Mar-11 10:59 
GeneralRe: problem in using library of LFSR Pin
jschell13-Mar-11 11:14
jschell13-Mar-11 11: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.