171: ATM system with file handeling and data backup without using classes and oop
#include < iostream > #include < fstream > #include < iomanip > #define maxlim 20 // The maximum data that will be stored in .txt file is set limit 20 rows using namespace std ; // using std::cout; // using std::cin; // using std::string; // using std::ios; // using std::getline; // Using these in place of using namespace std will make compiler fast // using std::ws; // using std::endl; // using std::ifstream; // using std::ofstream; // using std::to_string; string acc_in_use ; // When user is authenticated, his account number will be stored in it and this can be used anywhere string data [ maxlim ][ 4 ]; // Whole .txt file data will be stored in this when import_data() is called and this is global. int rows = 0 ; // rows are calculated and stored in this for later use in for loops in iterating 2D array void import_data () { data [ maxlim ][ 4 ]; // initializing array in which ...