I have a file that I am trying to print to the screen, but all it returns is "0x28fe88", when the file itself is 13 columns by a couple hundred rows.
#include <iostream>
#include <fstream>
#include <istream>
#include <ostream>
#include <cstdlib>
using namespace std;
int main()
{
//Opens .txt file
ifstream infile1;
infile1.open("Taylor.txt");
//Fail check
if(infile1.fail())
{
cout << "File failed to open.\n";
exit(1);
}
//Prints file to screen (not correctly)
cout << infile1;
//Closes file
infile1.close();
return 0;
}
I would otherwise not post the full code, but I hope it is short enough to not warrant catching flak.