Identifier is undefined

Hi guys, am doing my first programming assignment for uni and having trouble understanding why originalNumber is not recognized at line 24/25/26, if anybody could point me in the right direction I'd be extremely grateful.

Thanks!

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
  #include <iostream>
#include <iomanip>
using namespace std;

//Global integer variable declaration
int digit1, digit2, digit3, originalNumber, key;

int main()
{
	void replaceDigits();
	void isolateDigits();
	void swapDigit1WithDigit3();
	void recomposeEncryptedNumber();

	cout << "Enter the original three-digit number: ";
	cin >> originalNumber;

	system("PAUSE");
	return 0;
}

void isolateDigits()
{
	digit1 = originalNumber / 100;
	digit2 = (orginalNumber % 100) / 10;
	digit3 = orginalNumber % 10;
}
Check the spelling of the variable on lines 25 and 26.

I'd put function prototypes before main, not inside it. (lines 10-13)
Topic archived. No new replies allowed.