A
andy.dreistadt
Hi all,
I know this is a pretty easy question for most, but I haven't touched
C++ in 5 years and am a bit rusty.
I have the following set-up:
my_function(BYTE *buf,WORD len)
{
//some stuff
int num_bytes = serialSendRcv(0, buf, len, 5000);
//....more stuff
}
The problem is that the first byte of the buf array (buf[0]) is a
filter byte that I no longer need and do not want to pass to the
serialSendRcv() method. Instead, I would like to send it the array
containing buf[1]..buf[len]. I heard the best way to do this is to
dereference the array and increment the address, but I can't remember
how that's done.
Thanks in advance for any help you can give,
Andy
I know this is a pretty easy question for most, but I haven't touched
C++ in 5 years and am a bit rusty.
I have the following set-up:
my_function(BYTE *buf,WORD len)
{
//some stuff
int num_bytes = serialSendRcv(0, buf, len, 5000);
//....more stuff
}
The problem is that the first byte of the buf array (buf[0]) is a
filter byte that I no longer need and do not want to pass to the
serialSendRcv() method. Instead, I would like to send it the array
containing buf[1]..buf[len]. I heard the best way to do this is to
dereference the array and increment the address, but I can't remember
how that's done.
Thanks in advance for any help you can give,
Andy