10.02.2017, 01:50
Make an array out of lastreport. And start storing the reports for example: lastreport[1], lastreport[2] etc. So when you get a new report make lastreport[5] = lastreport[4], lastreport[4] = lastreport[3], lastreport[3] = lastreport[2], lastreport[2] = lastreport[1] and lastreport[1] = string. Also i am pretty sure that is not how you save strings into a variable. So lastreport would have to be a 2D array, so lastreport[number of reports][size of the string]. So format(lastreport[1], sizeof(lastreport[1]), string); would be an example how to save the string into the first report, but like i mentioned above you would want to start from the other end.