I was wondering if anyone was familiar with reading data from a file into your program. I tried using the file stream the same way cout is used but it doesnt seem to work properly. Would the getline(); function work? If so, how would that be implemented?
#include <iostream>
#include <fstream>
#include <strings>
using namespace std;
int main()
{
fstream readFile;
readFile.open("Input.txt");
string sample;
readfile<<sample;
cout<<"Here is a line: "<<sample;
return 0;