Click here to Skip to main content
12,945,706 members (51,729 online)
Rate this:
 
Please Sign up or sign in to vote.
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

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


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

"

kindly direct me

P.s i am a beginner so ignore my dumbness
Posted 3-Dec-12 19:06pm
v2
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

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

array<Bitmap^>^ bmpArray = gcnew array<Bitmap^>(10000);
  Permalink  
v2
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

array<bitmap^>^ ab = gcnew array<bitmap^>(100);
  Permalink  

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

    Print Answers RSS
Top Experts
Last 24hrsThis month
OriginalGriff 4,899
CHill60 3,180
Maciej Los 2,453
Jochen Arndt 1,910
ppolymorphe 1,785


Advertise | Privacy | Mobile
Web02 | 2.8.170518.1 | Last Updated 4 Dec 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100