Syntax error: word unexpected (expecting “)”)

An answer to this seems to be posted in the instructions to which you linked. Admittedly it’s a long way down in the comments but it didn’t take long to search for qmake: Syntax error: word unexpected. Quote: Tej says: January 4, 2013 at 12:20 pm Ok, I have solved the Problem. Its very unfortunate that ppl did … Read more

error: expected unqualified-id before ‘if’

You can’t have free-standing code like that. All code needs to go into functions. Wrap all that in a main function and you should be ok once you’ve fixed your use of QTextStream (it has no eof method, and it doesn’t have a readline method either – please look at the API docs that come with usage examples).