File Writing/Reading system
Since i've bypassed the login system, i've not tried to create a simple reading and writing to a file system to keep track of business records.
Here are the code snippets:
..that is the record data function, and here is the read data funcion:
std::ofstream File_Input("Record.txt", std::ios::app);
std::cout << "Welcome, please record the data as follows:" << std::endl;
std::cout << "\nNote! Do not place spaces inbetween words when recording\nnew products, this will crash the application!" << std::endl;
std::cout << "\nProduct Purchased:";
std::cin >> m_cProduct;
/* std::cout << "\nDate the Transaction was made: ";
std::cin >> m_sDatePurchased;
std::cout << "\nQuantity of the Purchased Item: ";
std::cin >> m_iQuantity;*/
File_Input << m_cProduct << "\n";
std::cout << "Thank you for recording!" << std::endl;
I C&R'd the whole program with no errors, untill i get a run-time error!
std::cout << "Here are the records you requested: " << std::endl;
std::cout << m_cBuffer;
std::cout << "\n\nThank you for reading our records!" << std::endl;
I can write to the file just fine, but my program will not let me read the text! I will post a screenie to elaborate.
Can anybody tell me what i've done wrong?