Untitled
unknown
plain_text
2 years ago
627 B
3
Indexable
#include <fstream> #include <iostream> using namespace std; struct machina { char color; int power; string marca; string model; int pas; float dvig; int prob; }; int main() { ifstream in("soska.txt"); machina m; in >> m.color >> m.power >> m.marca >> m.model >> m.prob >> m.dvig >> m.prob; cout<< m.color <<endl << m.power << endl << m.marca << endl << m.model << endl << m.prob << endl<< m.dvig << endl << m.prob<<endl<<endl; m.color = 'w'; m.prob = 0 ; cout << m.color << endl << m.power << endl << m.marca << endl << m.model << endl << m.prob << endl << m.dvig << endl << m.prob; }
Editor is loading...