very important: as i can do so that the user can enter data into a .txt file . i try with: ... float Data; fstream Leer(temp.txt , iOS::app); if(Leer.good()) {cout<<"Enter data: "; cin>>Data; Leer>>Data; Leer.close(); } other way? Help please. | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
0

very important: as i can do so that the user can enter data into a .txt file . i try with: ... float Data; fstream Leer(temp.txt , iOS::app); if(Leer.good()) {cout<<"Enter data: "; cin>>Data; Leer>>Data; Leer.close(); } other way? Help please.

10th Oct 2016, 4:07 PM
David Viadas
David Viadas - avatar
2 Réponses
0
Maybe data type set to char?)
12th Oct 2016, 1:53 AM
FireWalker
0
if you want to place the data into a stream you have to first convert it into a character (char) and then you have to pipe otherwise: Leer<<Data
29th Dec 2016, 4:12 PM
Loeschzwerg