Question: C++, Just need help figuring out why this file wont read in a .txt file no errors in the code just runs out of space,
C++, Just need help figuring out why this file wont read in a .txt file
no errors in the code just runs out of space, can't figure out why.
any help would be appreciated
what(): error std::bad_alloc
#include
using namespace std;
int x = 0;
int main() { CookieFile commands; const int MAX_CHAR = 101;
//string filename; char filename[MAX_CHAR];
do { cout<<"Type in name of file: "; //cin >> filename; cin.getline(filename, MAX_CHAR, ' ');
//cout< while(commands.readfile(filename) == false); cout<<"Enter the number to choose the command." << endl; cout<<"1. Print Order Summary " < while (x != 3) { cin >> x; switch(x) { case 1: commands.printsummary(); cin.clear(); cin.ignore(); break; case 2: commands.printlist(); cin.clear(); cin.ignore(); break; case 3: return 0; break; default: cout<<"Invalid Number Input"<
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
