MemberDetails - << endl 34...

Info icon This preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
1 #include <iostream> 2 #include <fstream> 3 #include <string.h> 4 5 using namespace std ; 6 class MemberDetails { 7 8 private : 9 string FirstN ; 10 string LastN ; 11 string PhoneNumber ; 12 string address ; 13 string email ; 14 15 public : 16 MemberDetails (); 17 void setCutomerInfo ( string , string , string , string , string ); 18 void getCustomerInfo (); 19 void SaveInfoToFile ();}; 20 21 MemberDetails :: MemberDetails (){ } 22 void MemberDetails :: setCutomerInfo ( string FirstN , string LastN , 23 string PhoneNumber , string address , string email ) 24 { 25 this -> FirstN = FirstN ; 26 this -> LastN = LastN ; 27 this -> PhoneNumber = PhoneNumber ; 28 this -> address = address ; 29 this -> email = email ; 30 }; 31 void MemberDetails :: getCustomerInfo (){ 32 cout << "\n\t\tName : " << FirstN << " " << LastN << endl ; 33 cout << "\n\t\tPhone Number :" << PhoneNumber
Image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: << endl ; 34 cout << "\n\t\tAddress : " << address << endl ; 35 cout << "\n\t\tE-mail : " << email << endl ; 36 }; 37 void MemberDetails :: SaveInfoToFile (){ 38 ofstream outFile ; 39 string FileN = " record.txt" ; 40 char FileNCustomer [ 50 ]; 41 strcpy ( FileNCustomer , FileN . c_str ()); 42 outFile . open ( FileNCustomer ); 43 44 outFile << FirstN << endl ; 45 outFile << LastN << endl ; 46 outFile << PhoneNumber << endl ; 47 outFile << address << endl ; 48 outFile << email << endl ; 49 50 outFile . close (); 51 FileN = " record.txt" ; 52 strcpy ( FileNCustomer , FileN . c_str ()); 53 outFile . open ( FileNCustomer ); 54 55 outFile << 0.0 << endl ; outFile . close (); 56 57 };...
View Full Document

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern