Subscribe Us

Responsive Advertisement

Advertisement

How to read from a file

 




#include<bits/stdc++.h>

#include<fstream>

using namespace std;

int main()

{


    ifstream in;

    in.open("input.txt");

    int x;

    in>>x;

    cout<<x<<endl;

    in.close();

    return 0;

}





Post a Comment

0 Comments