Just some kind advice. The more code you dump, the more unlikely it is anybody will help. Narrow down your problem first. If possible, write a minimal and complete (i.e. probably just main() and at...