The "garbage written" in the output file might be due to this line:
writeFile.write(reinterpret_cast<const char *>(&obj),sizeof(Person));
reinterpret_cast will not add spaces for you automatically which is how logically the operator>> file reading would be working based on words separated by spaces.
I would say, reinterpret_cast should always be the last resort if there are better options. Based on your existing write functionality, I will assume that you prefer to write the file in text mode instead of binary.
I would simple use the following mechanism:
string out_str = obj.getName() + " " + obj.getAddress() + " ";
writeFile.write(out_str.c_str(), out_str.size());
I would personally write them line-by-line as opposed to word-by-word. Also, you will have issues if the names and addresses appear to be more than just one word, so be aware of that.