Accessing the MC ++ intermediate access array

Using Managed C ++ (VS 2005), how would you pass an <unsigned char> array to a function as unsigned char *?

 ref class Utils
 {
     public: 

     static void A(array<unsigned char, 1> a)
     {
       //How do I call B()????
     }

     static void B(const unsigned char* a)
     {
        //do stuff
     }

 };

      

0


source to share


1 answer


Do you do it like this?



 void A(array<unsigned char, 1> a)
 {
     pin_ptr<unsigned char> pData= &a[0];
     B(pData);
 }

      

+1


source







All Articles