c++ cli - Common pattern when using arrays in C++/CLI -


i experienced c++, began learn c++/cli. notice following pattern lot:

array<string^>^ x; 

how guys think this? way interpret is, array of strings , want them on managed heap , why use string^, want vector on managed heap , why have

array<something>^. 

correct?

c++cli ref class must live on managed heap. actual non-managed heap instances blocked.

both string , array ref class types, must live on managed heap.

c++, in order remind user these garbage-collected pointer types, , not literals or traditional pointer types, requires end types ^.

while redundant (all instances of array<> array<>^ -- hence in c# there no such ^ token), reminder managed type , not normal type helps when mix managed , unmanaged code.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -