This post is kind of embarassing to me, but maybe it's the late night programming... I'm trying to compare the input placed in a string to a set thing... You will see. I feel like I'm losing progress
string event, none;
string place;
int month, day, year, hour, min, y, n;
system("CLS");
cout << " Event Scheduler\n\n";
cout << "Enter an event that you would like to be reminded of!\n";
cout << "\n";
cout << "If you have no events to be reminded of, enter none or, press the \nX button in the top right corner\n\n";
cout << "If you have no events to be reminded of, enter none or, press the \nX button in the top right corner\n\n";
cin >> event;
if (event == none)
{
return 0;
}
else
{
system("CLS");
cout << "Today's date is: " << _strdate( dateStr);
cout << "\nEnter month of the event\n";
cin >> month;
cout << "\nEnter day of the event\n";
cin >> day;
cout << "\nEnter the year of the event\n";
cin >> year;
With this configuration, it compiles and will accept input but it will go through the return 0; and go to the today's date section. What I would like to do is have the user enter none, and then the program closes. The rest of my code works, I just cut it out to save time. Once again, I'm sure this is something easy, but it's late and I want to get this done before I go to bed

New Topic/Question
Reply



MultiQuote




|