Click here to Skip to main content
15,879,490 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello

My question is i want to declare an array of System::Drawing::Bitmap in C++ forms i i can declare it in c# although.In c# you do this

C#
System.Drawing.Bitmap[] bmpArray = new System.Drawing.Bitmap[10000];


when i try to do it in C++
C++
System::Drawing::Bitmap^ bmpArray[] ;
it says
"
VB
Error   1    : a native array cannot contain this managed type  

"

kindly direct me

P.s i am a beginner so ignore my dumbness
Posted
v2

I don't code in C++ often but I think this is correct...

array<Bitmap^>^ bmpArray = gcnew array<Bitmap^>(10000);
 
Share this answer
 
v2
array<bitmap^>^ ab = gcnew array<bitmap^>(100);
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900