Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <Windows.h>
- #include <string>
- #include <ShlObj.h>
- #include <ctime>
- #define MAX_DATE 12
- using namespace std;
- int choice_2;
- string new_entry;
- string entry;
- string location;
- string folder_name;
- void menu();
- //void create_entry();
- //void modify_entry();
- void delete_entry();
- void exit_program();
- int main()
- {
- int choice;
- cout << "Welcome to the SSD Journal Application!" << endl;
- do {
- menu();
- cin >> choice;
- cout << endl;
- if (choice == 1){
- cout << endl;
- }
- else if (choice == 2) {
- //modify_entry;
- }
- else if (choice == 3) {
- delete_entry();
- cout << endl;
- }
- else if (choice == 4) {
- }
- else if (choice == 5) {
- exit_program();
- }
- else {
- cout << "You have entered an invalid option. Please pick an option from the following commands:" << endl;
- }
- } while (choice != 5);
- }
- void menu()
- {
- cout << "What would you like to do? Here are your following options:" << endl;
- cout << "1. Create new entry" << endl;
- cout << "2. Modify existing entry" << endl;
- cout << "3. Delete entry" << endl;
- cout << "4. List past 10 entries" << endl;
- cout << "5. Exit program" << endl;
- cout << "What would you like to do?" << endl;
- }
- void create_entry() {
- string file_name;
- cout << "You have chosen to create a new entry." << endl;
- Sleep(1000);
- cout << "What do you want your entry to be named?" << endl;
- cin >> file_name;
- file_name += ".txt";
- ofstream outputfile(file_name);
- }
- //void modify_entry() {
- // cout << "You have chosen to modify an entry."
- //}
- void delete_entry(){
- cout << "You have chosen to delete an entry." << endl;
- cout << "In a moment, an Explorer window will open. From there, you can proceed to delete the entry that you want to delete." << endl;
- Sleep(4000);
- ShellExecute(NULL, "explore", "C:\\Journal", NULL, NULL, NULL);
- }
- void exit_program()
- {
- cout << "Thank you for using the SSD Journal Application." << endl;
- cout << "Please press any key to exit. Goodbye." << endl;
- system("pause");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement