Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- using namespace std;
- int main() {
- int a;
- cout << "a = ";
- cin >> a;
- cout << endl;
- fstream f;
- f.open("file");
- if ( f.is_open() ) {
- f << a << endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement