Sending infrared over mqtt error

If you can not read the documentation for a standard C/C++ function, programming may not be for you. Cut & Pasting without knowing what is going on or trail & error are not good programming techniques. If you do want to learn, there are many, many examples that come with the IDE. Start small, learn, grow.