Try working out how you would do that in main() - without using any threads. Once you get that right, work out how to pass necessary data to a thread.



Indeed. It is trying to initialise...