Error 1 error C2440: 'initializing' : cannot convert from 'std::string' to 'std::string *'
1 2 3 4 5 6 7
cout<<"Please enter book name:"<<endl;
cin>>bookName; //user enters book name
string *addBookOne=bookName; //string pointer is created
reservationFile<<*addBookOne; // pointer string added to file
//write book name to reservationFile file
Oh, well. Judging by the error, I will guess that bookName is a string, right? If so, why are you trying to assign a string to a string pointer without referencing it (&)? Also, why do you even need the string pointer at all if you're just going to write it to the file either way? Can't you just do reservationFile << bookName;?