Well the title explains it, im just making this to practice a few things ive learned. Im not sure how I will be able to do the editor or deleter, seems like it will be very hard, but ill deal with it when I come to it. Basicaly this stores everything to a .txt file and the program manipulates it.
First thing im having trouble with is making a while loop that never ends, since this will be the menu it will always be refrered back to when your done with the function...
#include <iostream.h>
#include <stdlib.h>
#include <fstream.h>
// Variables
char choice1;
char choice2;
// Functions
void mainMenu();
void addNote();
void delNote();
void edtNote();
void viwNote();
using namespace std;
int main()
{
mainMenu();
system("PAUSE");
return 0;
}
void mainMenu()
{
while (choice1) {
cout << "Main Menu/n1. Add Note/n2. Delete Note/n3. Edit Note/n4. View Notes\n\nOption: ";
cin >> choice1;
switch ( choice1 ) {
case '1':
addNote();
break;
case '2':
delNote();
break;
case '3':
edtNote();
break;
case '4':
viwNote();
}
}
}
void addNote() {
}
void delNote() {
}
void edtNote() {
}
void viwNote() {
}
I wanted to use gets() to get the input but it wouldnt work at all, so im stuck with cin. Anyways back to the loop I was trying to use while(choice1) { to work as long as choice1 exists but that doesnt work, it starts off as null, and sometimes it will be valueless, so im not even gonna try to make a piece of crap to get that to work, any ideas?