Well thanks to your help, I figured it out. Thank you so much. I have something to work with now.
Here is what I came up with.
#include <fstream>
#include <iostream>
int main()
{
int testVariable = 72;
int testVariable2 = 0;
std::cout << testVariable << std::endl;
std::ofstream outputFile;
outputFile.open("C:/binary.txt", std::ios::out | std::ios::binary);
outputFile << testVariable;
outputFile.close();
std::ifstream inputFile;
inputFile.open("C:/binary.txt", std::ios::in | std::ios::binary);
inputFile >> testVariable2;
inputFile.close();
std::cout << testVariable2 << std::endl;
system("pause");
return 0;
}