Category : file-handling

I’m sorry I had to write all of the unnecessary stuff. It wouldn’t accept all this code otherwise. I have read a csv file into my c++ program and applied linked list to it. I want to sort the order id column in the csv using linked list. main.cpp #include"iostream" #include"string" #include"fstream" #include"node.h" #include"linkedlist.h" #include"bst.h" ..

Read more

ifstream old; ifstream newfile; old.open("customer.dat", ios::in|ios::app|ios::out); newfile.open("new.dat"); newfile.close(); ofstream newrec; newrec.open("new.dat", ios::in|ios::out|ios::app); while(getline(old,line)) { std::istringstream iss (line); iss>>add.accNum>>add.FirstName>>add.MiddleName>>add.LastName>>add.pass>>add.age>>add.Village>> add.PostOffice>>add.PoliceStation>>add.District>>add.nid>>add.phone>>add.money; if(check.accNum== add.accNum && check.pass == add.pass) { cout<<"tt1.Depositntt2.WithdrawnnttEnter Choice: "; cin>>choice; if(choice == 1) { cout<<"Enter the amount you want to deposit: "; cin>>trans.money; add.money += trans.money; cout<<"Your Current Balance is "<<add.money<<" tk.nnDeposited Successfully!"; } else ..

Read more

I’m trying to create a simple terminal program that generates random Japanese Gojuōn for learning purposes. I have a source file, named "source", which looks something like this: A I U E O Ka Ki Ku Ke Ko … あ い う え お か き く け こ … Now, I’m trying to read each line of content into a string variable, ..

Read more