unsigned short malloc ?

Joined
Jul 14, 2009
Messages
1
Reaction score
0
- Example:

unsigned short *p = (unsigned short *)malloc(0x2000 * sizeof(unsigned short));

- Is the cast on malloc needed?
- Plus, if I do:

unsigned short *x = &p[3];

- So, x starts at byte 6, or 3rd value, correct?
 

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
473,770
Messages
2,569,583
Members
45,072
Latest member
trafficcone

Latest Threads

Top