mardi 27 mars 2018

How to display a file in c++?

I need someone to edit that code so that i could display a file!!

#include <iostream>
#include <fstream>

using namespace std;
int main() 
{
     string data; //enter a data as a string 
     ifstream datafile; // input datafile as ifstream
     datafile.open("test.txt"); // open test file
}

Aucun commentaire:

Enregistrer un commentaire