There is function like MyFunction( T* apElements, int anCount );
As it can be seen it accepts an array as argument..
In my code, I have a pointer to array ( MyObject** ),
and I need to pass this array to the MyFinction...
If I write like followings in my code, does it becomes a costly operation? I mean, I do de-reference 'a pointer to array' to 'an array'; and the size of array is very large( e.g. 100.000 ); In this case how does 'de-referencing' behave ? Does it dereference all thousands of objects or something else ?
Well, the difference is that with * you can have dynamic arrays at runtime, while you cannot do that with . The only real danger is that you will have memory leaks or memory overwrites, but that's a common problem for c-style arrays.
That's a great article that I will certainly be advising everyone to read. I absolutely agree: STL is both generic and fantastic, but it does have 2 major drawbacks: the documentation is dreadful, hard to find and hard to read; and the code is incredibly hard to read and debug. But that's the price you pay performance, I guess. Of course, you always have a good source of advice...
Some cause happiness wherever they go; others, whenever they go.