I am using this simple routine to copy a file.I use MFC(e1 is a variable for the EDIT control of type CString).I get a error because the compiler can not convert from string to CString.How to solve this?
Code:
#include <string>
#include <fstream>
#include <iostream>
using namespace std;

string got,all;;
ifstream in("readme.txt");
ofstream out("copy.txt");
while(getline(in,got))
	  out<<got<<"\n";
all += got;
e1 =all; 
UpdateData(false);
error C2679: binary '=' : no operator defined which takes a right-hand operand of type 'class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >' (or there is no acceptable