#include <iostream> #include <fstream> #include <vector> #include <string> #include <cstdlib> using namespace std; int main() { int repeat; int m; string d1,d2,d3; ofstream test; test.open ("Data.txt", ios::out | ios::ate | ios::app); repeat: cout << "Student name: "; m: cin >> d1; test << d1 << endl; cout << "" << endl << ""; cout << "Student ID: "; cin >> d2; test << d2 << endl; cout << "" << endl << ""; cout << "Student class: "; cin >> d3; test << d3 << endl; cout << "" << endl << ""; system("cls"); goto repeat; goto m; return 0; } |