I am building a console application in C++ and I want to have 2 things:
- when someone inputs the word "exit" to exit the console, and
- when someone inputs "showme" to show a string I have made.
I tried to make this
#include "stdafx.h"
#include <stdio.h>
#include <iostream>
using namespace std;
int answer;
cout << "What do you want to learn?" << endl;
cin << answer << endl;
if answer == "show"
cout << "You have been shown the light" << endl;
if answer == "exit"
exit.window
It is how I imagine the code to be, but if someone could please help, I am on my 4th C++ lesson. Thanks in advance.