Returning an Array in Managed C++

/// <summary> 
/// Returns list of children.
/// </summary>
ISceneNode* GetChildren() []
That's how to return an array of pointers to ISceneNodes. Yes, that's right, there are square brackets at the end of the function declaration.

five comments, already:

TSM - 02 04 06 - 20:24

one wonders who comes up with these things. In keeping with traditional form, anything after the function declaration should directly relate to the function (const is admittedly the only example that springs to mind). Logically, something relating to the return value should be at the beginning of the declaration where the return value type and any qualifiers are specified
Electron () - 03 04 06 - 01:24

...if we are talking about Managed(!!) c++ why not use

array<System::IntPtr^>^ myArray = gcnew array<System::IntPtr^>(myArraySize);

and use it like:

myArray[1] = (System::IntPtr)device->getSceneManager()->addAnimatedMeshSceneNode(...);



It works ;-) !

...just waiting for a c++ guru’s comments that REAL (loool) men do not use managed c++ – of course, REAL men are using a stone axe or a thingie called ‘vi’ ;-) !
[Duncan Mac Leod] (link) - 03 04 06 - 12:18

real men do not use managed c++!!11!! :)
niko - 03 04 06 - 18:58

Well, I dunno about “real men”, but men actually interested in speed are not using Managed C++. Platform wars are pointless (Windows has many benefits Linux does not & vice versa). But when you’re talking byte-code compiled against machine-code compiled, speed is an issue.

And yes, I have code that proves that in processing requiring nested loops – machine-code compiled C++ is ~300% faster than .NET compiled code (exactly the same code too). Something to do with .NET being REALLY bad about stack management from what I can tell.
Eternl Knight - 04 04 06 - 03:25

Remember personal info?
Email (optional):
URL (optional):
Enter "layered" (antispam):
Comment:Emoticons / Textile

  ( Register your username / Log in )

Notify: Yes, send me email when someone replies.  

Small print: All html tags except <b> and <i> will be removed from your comment. You can make links by just typing the url or mail-address.
Note: If you type in your email adress above, it will be visible to other visitors, although it will be hidden for bots using javaScript.