I have a file that needs to be converted to a binary file. To do this I understand I'll need to open a binary file pointer. However, when I do a

xchar = fgetc(infile); // infile is non-binary
// file pointer

How do I make xchar into a binary so it can be written into the the binary file?