"Skip" Problem? [Solved]
So I just started learning C++, and I figured the best way to remember / figure out new things is to practice. So, I was going to build a simple calculator. But I have a problem >_< here's the code so far. And I know it is un-organized, but I was trying to remove spaces and do stupid things to desperately make it work..
(ONLY _ADD() IS FINISHED)
Here is a SS of what happens when I first build / run:

Here's what SHOULD happen:
Sorry if I wasn't perfectly clear, feel free to ask questions.
Edit: If you can't see the screen shot, download the attachment.
(ONLY _ADD() IS FINISHED)
Code:
#include "stdafx.h"
#include <iostream>
using namespace std;
//Global Variables
int x;
int y;
int userAnswerX;
int userAnswerY;
int userChoice;
//Global Variables
int main()
{
cout << "===================\n";
cout << "= Calculator =\n";
cout << "===================\n";
cout << "1) Add\n";
cout << "2) Subtract\n";
cout << "3) Multiply\n";
cout << "4) Divide\n";
cout << "(Type the number)\n";
cin >> userChoice;
if (userChoice==1) _add();
if (userChoice==2) _subtract();
if (userChoice==3) _multiply();
if (userChoice==4) _divide();
else (system("pause>nul"));
}
int _add ()
{
cout << "\nEnter value for X: ";
cin >> userAnswerX;
x = userAnswerX;
cout << "\nEnter value for Y: ";
cin >> userAnswerY;
y = userAnswerY;
cout << "\nYou set X equal to ";
cout << x;
cout << "\nYou set Y equal to ";
cout << y;
cout << "\n \n";
cout << x + y
system("pause>nul");
}
int _subtract ()
{
}
int _multiply ()
{
}
int _divide ()
{
}

Here's what SHOULD happen:
Code:
================ = Calculator = ================ 1) Add 2) Subtract 3) Multiply 4) Divide (Type the number) "User types number here" ( Goes to _add(), _subtract(), _multiply(), or _divide() )
Edit: If you can't see the screen shot, download the attachment.
C++_SS.jpg


I'm still learning. :'(