How to extract data of a Blitz++ Array ?

G

Guch Wu

Array<unsigned char,2> A(10,10);

unsigned char* rawdata;
rawdata = new (unsinged char)[10*10];

Can I extract data in A to rawdata without using for loop?
 
R

Rolf Magnus

Guch said:
Array<unsigned char,2> A(10,10);

unsigned char* rawdata;
rawdata = new (unsinged char)[10*10];

Can I extract data in A to rawdata without using for loop?

Yes. You can use a while loop.
 
J

Jacek Dziedzic

Guch said:
Array<unsigned char,2> A(10,10);

unsigned char* rawdata;
rawdata = new (unsinged char)[10*10];

Can I extract data in A to rawdata without using for loop?

Until you say what "Array" is, the answer is "don't know".

- J.
 
J

Jason R. Blevins

Guch Wu said:
Array<unsigned char,2> A(10,10);

unsigned char* rawdata;
rawdata = new (unsinged char)[10*10];

Can I extract data in A to rawdata without using for loop?

Try using Array::data() which returns a pointer to the Array's
internal data.

Jason
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top