Update main.c

allocated arguments for a thread,
disclaimer: not tested, may not work