Firstly, in your main you have fstream afile, but as a parameter to appendR for some reason you pass infile, that does not exist.
If you wish to append text, there is no need to open your file in binary mode.
After checking if the file was found simply use << operator to transmit whatever you need.
Also, is there any reason why you are using <cstring> rather than <string> ?
I still failed to append record. Instead of appending, I overwrite everything and left with 1 record.
If appending binary file, need to open in binary mode? No special reason with <string>.