Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- BEFORE U RUN.....
- please have 2 .txt documents in the same folder of ur excutable
- testin.txt----------
- 10 20
- testout.txt is empty
- after runing, testout.txt should gives 30
- */
- #include <iostream>
- #include <fstream>
- using namespace std;
- int main(){
- ifstream inf("testin.txt");
- ofstream outf("testout.txt");
- int a,b;
- inf >> a >> b;
- outf << a+b;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement