Originariamente inviato da MItaly
Scusa, ho letto male. Comunque dovrebbe essere una cosa del genere:
codice:
void load(){
	string line; //this will contain the data <strong class="highlight">read[/b] from the file
	ifstream myfile ("a.txt"); //opening the file.
	if (myfile.is_open()) //if the file is open
	{
		while (! myfile.eof() ) //while the end of file is NOT reached
		{
			getline (myfile,line); //get one line from the file
			Form1->RichEdit1->Text += (line + '\n').c_str();
		}
		myfile.close(); //closing the file
	} else cout << "Unable to open file"; //if the file is not open output <--
.
Ciao,
sicuro sia giusto? Nel RichEdit non si visualizza niente, e il ciclo non mi sembra funzionare bene. :master: