error: expected primary-expression before ‘]’ token

hi, please i have this code :
void IRsend::sendSAMSUNG36(decode_results *results) {
sendRaw(results->rawbuf,results->rawlen,38);
};

this is the struct decode_results :

class decode_results {
public:
int decode_type; // NEC, SONY, RC5, UNKNOWN
union { // This is used for decoding Panasonic and Sharp data
unsigned int panasonicAddress;
unsigned int sharpAddress;
};
//unsigned long long value; // Decoded value
//unsigned long value2; // Decoded value2
//int TabData[9];
unsigned long long value;
int bits; // Number of bits in decoded value
volatile unsigned int *rawbuf; // Raw intervals in .5 us ticks
int rawlen; // Number of records in rawbuf.
};

and this is the function SendRaw :

void IRsend::sendRaw(unsigned int buf, int len, int hz)
{
enableIROut(hz);
for (int i = 0; i < len; i++) {
if (i & 1) {
space(buf*);*

  • }*
  • else {*
    _ mark(buf*);_
    _
    }_
    _
    }_
    _
    space(0); // Just to be sure*_
    }
    this program send IR signal using protocol Samsung36 (36 bits) , but in compilation i have an error :
    “error: expected primary-expression before ‘]’ token sendRaw(results->rawbuf[],results->rawlen,38);”
    i don’t understand the cause of this problem ,n please help me :blush:

At the risk of repeating what you've already been told.

This is your problem

results->rawbuf[]

thanks , i must write : sendRaw(results->rawbuf,results->rawlen,38);
not : sendRaw(results->rawbuf,results->rawlen,38);