Click here to Skip to main content
Rate this: bad
good
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
Edited 3-Dec-12 19:58pm
Tadit Dash83.4K
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

array<bitmap^>^ ab = gcnew array<bitmap^>(100);
  Permalink  
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

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

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Guruprasad.K.Basavaraju 450
1 Sergey Alexandrovich Kryukov 370
2 Shai Vashdi 318
3 OriginalGriff 265
4 Peter Leow 171
0 Sergey Alexandrovich Kryukov 9,109
1 OriginalGriff 5,290
2 Peter Leow 4,010
3 Maciej Los 3,535
4 Abhinav S 3,263


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