Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2014
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. private: System::Void button2_Click(System::Object^ sender, System::EventArgs^ e) {
  2. openFileDialog1->ShowDialog();
  3. ifstream my_input_file;
  4. pin_ptr<const wchar_t> wch = PtrToStringChars(openFileDialog1->FileName);
  5. my_input_file.open(wch,ios::in | ios::binary);
  6.  
  7. int i;
  8. float f;
  9.  
  10. my_input_file >>i >> f;
  11.  
  12. my_input_file.close();
  13. }
  14. private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
  15. saveFileDialog1->ShowDialog();
  16. ofstream my_output_file;
  17. pin_ptr<const wchar_t> wch = PtrToStringChars(saveFileDialog1->FileName);
  18. my_output_file.open(wch,ios::out | ios::binary);
  19.  
  20. int i=5;
  21. float f=7.3;
  22.  
  23. my_output_file << f << i;
  24.  
  25. my_output_file.close();
  26.  
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement