0

My main program uses a variable that stores the pointer to a byte.

How would I define that in the header?

antonpug
  • 13,724
  • 28
  • 88
  • 129
  • If I understand you right then unsigned char * – Shaun Wilde Nov 13 '11 at 05:03
  • 1
    Based on your series of questions tonight, you might find these useful, [The Definitive C Book Guide and List](http://stackoverflow.com/questions/562303/the-definitive-c-book-guide-and-list) – Blastfurnace Nov 13 '11 at 05:17

3 Answers3

1

If you use C99, you could do:

#include <stdint.h>


uint8_t *pointer_to_byte;
fghj
  • 8,898
  • 4
  • 28
  • 56
0

Byte is not a standard type but on many system any unsigned char will do the job on windows which I am more familiar there is a typedef for BYTE which is available in the windows headders

rerun
  • 25,014
  • 6
  • 48
  • 78
0

If you are writing something which relates to generic programming,you should use the void *. for most of the systems though you can use unsigned char *.

bashrc
  • 4,725
  • 1
  • 22
  • 49