Can I do somethings like this in c++ or what should I do.
unsigned int code[180];
if ( somethings )
{
code[] = {3150,1550,400,400,400,1150,450,350,400,400,400,1200,400,400,400,1150,400,400,400,400,400,1150,400,1200,400,1200,400,350,400,1200,400,400,400,1150,400,1200,400,1200,400,350,400,400,400,400,400,400,400,1150,400,1200,400,400,400,1150,400,1200,400,400,400,400,400,1150,400,400,400,400,400,1150,450,350,400,400,400,1200,400,1150,400,400,400,1200,400,1150,400,1200,400,1150,450,1150,400,1200,400,350,450,1150,400,400,400,1150,450,350,400,400,400,400,400,400,400,1150,400,400,400,1200,400,400,400,1150,400,1200,400,1150,400,1200,400,1200,400,350,400,400,400,1200,400,400,400,350,400,400,400,400,400,400,400,1150,400,1200,400,400,400,400,400,1150,400,1200,400,1150,450,1150,400,400,350,1200,450,350,400,1200,400,400,400,350,450,350,400,400,400,1200,400,350,450,1150,400,1000};
//irsend.sendRaw(code,sizeof(code)/sizeof(int),khz);
}
std::arrayor astd::vectorfor the array, solves the assignment problem. You can usestd::stringfor the string, solves the comparison problem.std::memcpy. But, prefer C++ containers mentioned in a comment above.