The problems with that code is that it isn't indented properly. That always ruins everything.
Always check all your statements are terminated (;'s) and that all your functions have a return type specified.
You also need to watch out for namespaces. Everything in the standard c++ libraries is in the std namespace. To use something from a namespace you just scope it by going std::ifstream for example.
The below code is syntactically ok (well, it compiles at least) but all you have is an uninitialized array big enough to hold 60 pointers...where does the data streamed from the inFile go?
inFile >> mainStruct.name[x];