sending multiple codes to the consumer products using uno and ir transmitter

hai
i am doing a project ir transmission .using analysIR i decode the ac codes and send the codes using ir sendRaw code but its sent only one code if i send another code previous code remove and then it send .
i wrote a sketch but its not compile where i did the mistake

#include <IRremote.h>
int i;
IRsend irsend;
int irSignal;
void setup()
{
Serial.begin(9600);
int khz=38;
Serial.println("sending power on presignal");
unsigned int irSignal[] ={4456,4360,576,1608,572,552,548,1612,568,1616,576,544,544, 528,568,1612,580,544,552,548, 548,1612,572,552,544,524,572, 1612,572,1612,568,552,544,1620,572,552,548,520,576,520,576, 1608,572,1612,572,1612,572,1612,568,1616,576,1612,572, 1612,572,1612,580,544,540,556,540,556,540,528,568,528,572, 528,576,1612,572,548,548,1616,568,1612,580,544,552,516,580, 520,576,1608,576,548,548,1612,568,552,548,524,572,1608,572, 1612,572,1612,580,5216,4428,4368,576,1608,576,548,548, 1612,572,1612,568,552,544,528,572,1608,572, 552,544,528, 580,1608,572,552,548,520,576,1608,572,1612,572,548,548, 1616,576,548,548,520,580,516,580,1604,576,1604,580,1604, 576,1608,576,1608,572,1620,576,1608,572,1608,576,548,548, 520,580,516,576,520,580,520,576,520,576,1612,568,552,544, 1620,576,1604,576,520,576,520,576,524,576,1608,572,524,576, 1612,568,552,544,528,568,1616,568,1616,576,1608,576};
irsend.sendRaw(irSignal, sizeof(irSignal) / sizeof(irSignal[0]), khz);

delay(1000);
}
void loop() {
int khz = 38;
char mode[]={'a','b','c','d'};
for(int i=0;i<sizeof(mode);i++)
{
unsigned int irSignal;

switch(mode*)*

  • {*

  • case'a':*
    Serial.println("power off");
    irSignal[]={4408,4384,568,1612,576,520,576,1612,580,1604,576,520,576, 520,572,1612,568,532,576,520,576,1612,576,520,576,524,572, 1608,572,1612,580,516,580,1612,576,548,548,1608,572,1612, 580,1604,576,1608,572,552,544,1616,576,1608,572,1620,568, 552,544,528,568, 528,568,528,576,1608,572,548,548,524,572, 1616,576,1608,572,1612,576,520,576,520,576,520,576,520,576, 520,576,524,568,528,568,528,568,1616,576,1608,572,1612,576, 1608,572,1612,568,5228,4432,4364,576,1608,572,524,572, 1616,572,1612,568,552,544,528,572,1612,576,520,572,552,544, 1616,576,548,548,528,568,1608,572,1612,576,520,576,1612, 580,520,576,1608,572,1612,568,1612,576,1608,572,524,572, 1616,576,1608,572,1620,572,524,568,528,568,552,544,552,544, 1612,580,516,576,524,572,1616,576,1608,572,1608,572,552, 544,552,544,552,540,528,568,532,576,520,576,524,568,524, 572,1616,576,1608,572,1612,568,1616,576,1612,568};

  • irsend.sendRaw(irSignal, sizeof(irSignal) / sizeof(irSignal[0]), khz);*

  • delay(1000);*

  • break;*
    case'b':
    Serial.println("temp 25");
    irSignal[] ={4428, 4360, 572, 1612, 572, 524, 572,1612, 572, 1612, 568, 528, 568, 528, 572, 1612, 568, 528, 568, 532, 576, 1608, 576, 520, 576, 520, 576, 1608, 576, 1608, 572, 524, 572, 1616, 568, 528, 568, 528, 568, 528, 568, 1612, 572, 1612, 572, 1612, 568, 1616, 600, 1584, 608, 1580, 604, 1580, 600, 1584, 600, 496, 600, 496, 600, 496, 600, 496, 600, 496, 604, 1580, 600, 1584, 600, 496, 600, 496, 600, 1584, 600, 496, 600, 492, 604, 496, 600, 496, 600, 496, 600, 1584, 600, 1580, 604, 496, 600, 1584, 608, 1576, 604, 1580, 604, 5164, 4464, 4332, 600, 1584, 600, 496, 600, 1588, 604, 1576, 608, 488, 596, 500, 596, 1588, 608, 488, 596, 504, 604, 1580, 604, 492, 604, 492, 604, 1580, 604, 1580, 600, 492, 604, 1588, 596, 500, 596, 500, 596, 500, 596, 1584, 600, 1584, 596, 1588, 596, 1584, 600, 1588, 604, 1584, 600, 1584, 596, 1584, 600, 496, 600, 496, 600, 496, 600, 496, 600, 496, 604, 1580, 600, 1584, 600, 496, 600, 496, 600, 1584, 608, 488, 600, 496, 600, 496, 600, 496, 600, 496, 600, 1584, 600, 1584, 600, 496, 632, 1552, 628, 1556, 628, 1556, 572};
    irsend.sendRaw(irSignal, sizeof(irSignal) / sizeof(irSignal[0]), khz);

  • delay(1000);*

  • break;*

  • case'c':*
    Serial.println("Temp20");
    irSignal[] ={4432,4364,568,1612,572,524,572,1616,576,1608,576,520,576,520,568, 1612,568,532,576,520,576,1608,576,520,576,520,576,1608,576,1608, 572,524,572,1616,568,528,580,516,568,528,568,1616,568,1612,568, 1616,580,1604,576,1608,576,1612,572,1612,568,1616,576,520,568,528, 568,528,568,524,572,528,568,528,568,528,572,1612,568,528,568,1616, 580,516,580,516,568,528,580,1604,580,1604,576,520,576,1612,572,524, 572,1612,572,1612,568,1616,580,5216,4460,4332,604,1580,600,496,600, 1588,596,1584,608,488,600,496,600,1584,596,500,600,500,604,1580, 604,492,604,492,604,1580,604,1580,604,488,608,1580,600,500,596,500, 600,496,600,1580,600,1584,600,1584,596,1584,600,1584,600,1592,600, 1580,604,1580,600,496,600,496,600,496,604,488,608,492,604,492,604, 492,604,1580,604,492,604,1580,604,492,604,492,604,496,600,1584,600,1584,596,496,600,1588,608,488,608,1580,600,1584,600,1584,600};
    irsend.sendRaw(irSignal, sizeof(irSignal) / sizeof(irSignal[0]), khz);

  • delay(1000);*

  • break;*

  • case'd':*
    Serial.println("mode auto");
    irSignal[] ={4432,4376,576,1608,576,520,576,1608,572,1612,572,524,572,524,572, 1608,572,528,568,528,568,1620,580,516,576,520,576,1604,576,1608, 576,520,576,1612,568,528,580,516,580,516,568,1616,576,1604,580, 1604,576,1608,576,1608,572,1616,576,1608,576,1604,576,520,608,488, 608,488,600,496,600,496,600,500,604,492,608,1572,608,1576,604,1580, 604,492,604,492,604,492,604,1580,604,1580,600,496,600,496,600,492, 604,1584,600,1584,596,1584,576,5196,4460,4336,596,1584,600,496,600, 1588,604,1580,604,492,604,488,608,1576,604,496,600,496,600,1584, 600,496,600,496,600,1584,596,1588,596,496,600,1592,600,496,600,496, 600,496,600,1580,600,1584,600,1584,596,1584,600,1584,608,1580,600, 1584,600,1584,600,496,596,500,596,496,600,496,600,500,600,496,600, 496,600,1580,600,1584,600,1584,596,500,596,496,600,500,596,1588, 604,1576,608,488,608,488,596,500,596,1592,600,1580,604,1580,572};

}
irsend.sendRaw(irSignal, sizeof(irSignal) / sizeof(irSignal[0]), khz);

  • delay(1000);*

  • break;*

  • }*

  • }*

}
the error is expected primary-expression before ']' token
please help me
thank you

i wrote a sketch but its not compile where i did the mistake

You failed to post the COMPLETE error message, which includes line number and column number.
You failed to post your code correctly. Is half of your code REALLY in italics?

By the way, you can NOT use the array initialization syntax anywhere EXCEPT where you declare and initialize the array in one statement.

thank you for your replies,

PaulS:
You failed to post the COMPLETE error message, which includes line number and column number.
You failed to post your code correctly. Is half of your code REALLY in italics?

this is the complete error

:\Users\Dhananjay\Documents\Arduino\sketch_may01a\sketch_may01a.ino: In function 'void loop()':

C:\Users\Dhananjay\Documents\Arduino\sketch_may01a\sketch_may01a.ino:18:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

for(int i=0;i<sizeof(mode);i++)

^

sketch_may01a:26: error: expected primary-expression before ']' token

irSignal[]={4408,4384,568,1612,576,520,576,1612,580,1604,576,520,576, 520,572,1612,568,532,576,520,576,1612,576,520,576,524,572, 1608,572,1612,580,516,580,1612,576,548,548,1608,572,1612, 580,1604,576,1608,572,552,544,1616,576,1608,572,1620,568, 552,544,528,568, 528,568,528,576,1608,572,548,548,524,572, 1616,576,1608,572,1612,576,520,576,520,576,520,576,520,576, 520,576,524,568,528,568,528,568,1616,576,1608,572,1612,576, 1608,572,1612,568,5228,4432,4364,576,1608,572,524,572, 1616,572,1612,568,552,544,528,572,1612,576,520,572,552,544, 1616,576,548,548,528,568,1608,572,1612,576,520,576,1612, 580,520,576,1608,572,1612,568,1612,576,1608,572,524,572, 1616,576,1608,572,1620,572,524,568,528,568,552,544,552,544, 1612,580,516,576,524,572,1616,576,1608,572,1608,572,552, 544,552,544,552,540,528,568,532,576,520,576,524,568,524, 572,1616,576,1608,572,1612,568,1616,576,1612,568};

^

sketch_may01a:27: error: invalid types 'unsigned int[int]' for array subscript

irsend.sendRaw(irSignal, sizeof(irSignal) / sizeof(irSignal[0]), khz);

Multiple libraries were found for "IRremote.h"
^

Used: C:\Users\Dhananjay\Documents\Arduino\libraries\IRremote
sketch_may01a:34: error: expected primary-expression before ']' token

Not used: C:\Program Files (x86)\Arduino\libraries\RobotIRremote
irSignal[] ={4428, 4360, 572, 1612, 572, 524, 572,1612, 572, 1612, 568, 528, 568, 528, 572, 1612, 568, 528, 568, 532, 576, 1608, 576, 520, 576, 520, 576, 1608, 576, 1608, 572, 524, 572, 1616, 568, 528, 568, 528, 568, 528, 568, 1612, 572, 1612, 572, 1612, 568, 1616, 600, 1584, 608, 1580, 604, 1580, 600, 1584, 600, 496, 600, 496, 600, 496, 600, 496, 600, 496, 604, 1580, 600, 1584, 600, 496, 600, 496, 600, 1584, 600, 496, 600, 492, 604, 496, 600, 496, 600, 496, 600, 1584, 600, 1580, 604, 496, 600, 1584, 608, 1576, 604, 1580, 604, 5164, 4464, 4332, 600, 1584, 600, 496, 600, 1588, 604, 1576, 608, 488, 596, 500, 596, 1588, 608, 488, 596, 504, 604, 1580, 604, 492, 604, 492, 604, 1580, 604, 1580, 600, 492, 604, 1588, 596, 500, 596, 500, 596, 500, 596, 1584, 600, 1584, 596, 1588, 596, 1584, 600, 1588, 604, 1584, 600, 1584, 596, 1584, 600, 496, 600, 496, 600, 496, 600, 496, 600, 496, 604, 1580, 600, 1584, 600, 496, 600, 496, 600, 1584, 608, 488, 600, 496, 600, 496, 600, 496, 600, 496, 600, 1584, 600, 1584, 600, 496, 632, 1552, 628, 1556, 628, 1556, 572};

^

sketch_may01a:36: error: invalid types 'unsigned int[int]' for array subscript

irsend.sendRaw(irSignal, sizeof(irSignal) / sizeof(irSignal[0]), khz);

^

sketch_may01a:42: error: expected primary-expression before ']' token

Using library IRremote at version 2.0.1 in folder: C:\Users\Dhananjay\Documents\Arduino\libraries\IRremote
irSignal[] ={4432,4364,568,1612,572,524,572,1616,576,1608,576,520,576,520,568, 1612,568,532,576,520,576,1608,576,520,576,520,576,1608,576,1608, 572,524,572,1616,568,528,580,516,568,528,568,1616,568,1612,568, 1616,580,1604,576,1608,576,1612,572,1612,568,1616,576,520,568,528, 568,528,568,524,572,528,568,528,568,528,572,1612,568,528,568,1616, 580,516,580,516,568,528,580,1604,580,1604,576,520,576,1612,572,524, 572,1612,572,1612,568,1616,580,5216,4460,4332,604,1580,600,496,600, 1588,596,1584,608,488,600,496,600,1584,596,500,600,500,604,1580, 604,492,604,492,604,1580,604,1580,604,488,608,1580,600,500,596,500, 600,496,600,1580,600,1584,600,1584,596,1584,600,1584,600,1592,600, 1580,604,1580,600,496,600,496,600,496,604,488,608,492,604,492,604, 492,604,1580,604,492,604,1580,604,492,604,492,604,496,600,1584,600,1584,596,496,600,1588,608,488,608,1580,600,1584,600,1584,600};

^

sketch_may01a:44: error: invalid types 'unsigned int[int]' for array subscript

irsend.sendRaw(irSignal, sizeof(irSignal) / sizeof(irSignal[0]), khz);

^

sketch_may01a:50: error: expected primary-expression before ']' token

irSignal[] ={4432,4376,576,1608,576,520,576,1608,572,1612,572,524,572,524,572, 1608,572,528,568,528,568,1620,580,516,576,520,576,1604,576,1608, 576,520,576,1612,568,528,580,516,580,516,568,1616,576,1604,580, 1604,576,1608,576,1608,572,1616,576,1608,576,1604,576,520,608,488, 608,488,600,496,600,496,600,500,604,492,608,1572,608,1576,604,1580, 604,492,604,492,604,492,604,1580,604,1580,600,496,600,496,600,492, 604,1584,600,1584,596,1584,576,5196,4460,4336,596,1584,600,496,600, 1588,604,1580,604,492,604,488,608,1576,604,496,600,496,600,1584, 600,496,600,496,600,1584,596,1588,596,496,600,1592,600,496,600,496, 600,496,600,1580,600,1584,600,1584,596,1584,600,1584,608,1580,600, 1584,600,1584,600,496,596,500,596,496,600,496,600,500,600,496,600, 496,600,1580,600,1584,600,1584,596,500,596,496,600,500,596,1588, 604,1576,608,488,608,488,596,500,596,1592,600,1580,604,1580,572};

^

sketch_may01a:53: error: invalid types 'unsigned int[int]' for array subscript

irsend.sendRaw(irSignal, sizeof(irSignal) / sizeof(irSignal[0]), khz);

^

C:\Users\Dhananjay\Documents\Arduino\sketch_may01a\sketch_may01a.ino: At global scope:

sketch_may01a:60: error: expected declaration before '}' token

}

^

exit status 1
expected primary-expression before ']' token

Those 5 arrays take up nearly all of the SRAM in an Uno. You should consider storing and retrieving the arrays to/from Progmem. Nick Gammon has a page on using Progmem with arrays.