-4

I am having an issue with my C++ code. It keeps telling me Undeclared Identifier in the second function (the menu), but I cannot see the issue since I am passing the variable. The code is here

MLGSalad
  • 3
  • 3
  • Please reconsider your use of bad practices [`using namespace std`](http://stackoverflow.com/q/1452721/1171191) and [`endl`](http://chris-sharpe.blogspot.co.uk/2016/02/why-you-shouldnt-use-stdendl.html). – BoBTFish Mar 03 '16 at 21:40
  • 1
    This post is offtopic without a [MCVE](http://stackoverflow.com/help/mcve) in the post itself. – Pixelchemist Mar 03 '16 at 21:42

1 Answers1

1
//Menu
void menu(int &selction) //TYPO!
{
    cout << "Welcome to the math work along program!" << endl;
    cout << "This will generate 2 numbers with the selected operator and\n allow you to solve the equation" << endl;
    cout << "1. Addition\n2. Subtraction\n3. Multiplication\nOr type -1 to quit\n";
    cin >> selection;

You have a typo. You've misspelled selection as selction

Xirema
  • 19,889
  • 4
  • 32
  • 68