I'm converting them to strings using sprintf then using fwrite but I'm getting strange errors so I figure there must be something simpler.