Posts

Showing posts from July, 2023

173: Restaurant management system with file handeling and data backup without using classes and oop

// username ==> qwe // password ==> 123 #include < iostream > #include < fstream > using namespace std ; #define limit 100 string data [ limit ][ 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 [ limit ][ 4 ]; // initializing array in which we will import data     ifstream file ;                   // it must be ifstream not fstream     file . open ( " Data.txt " , ios :: app ); // set file name and ios::app will not overwrite file while writing it again     rows = 0 ;               // declaring rows (these are total rows in .txt file)     while ( file . eof () == 0 ) // reading file till end of file...

172: Real Estate Management System with file handeling and data backup without using classes and oop

// admin username: developer256 // admin password: qwerty // p in data.txt --> plot to sell // hr in data.txt --> house for rent // hs in data.txt --> house to sell // sr in data.txt --> shop for rent #include < iostream > #include < fstream > using namespace std ; #define limit 100 string data [ limit ][ 7 ]; // 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 [ limit ][ 7 ]; // initializing array in which we will import data     ifstream file ;                   // it must be ifstream not fstream     file . open ( " Data.txt " , ios :: app ); // set file name and ios::app will not overwrite file while writing it again     rows = 0 ;     ...