LNK 2019 and LNK 1120 errors in program to change between lowercase and uppercase.

First off, I'm new here, so, I would like to say Hi : P
My name is Zach, and I am relatively new to coding. I have been taking an online course for the past few days to teach me a strong amount of knowlege in video game design and developement, but I had previously known some of the basics of C++. (The course is over 8 months, so i will be learning everything from the basics of coding up to a ton of different stuff, so it's ok that i lack this much knowledge when im taking this course.)
My problem is in an exercise given to me at the end of the third chapter of my book. I am supposed to write a program that will prompt the user to enter a letter, and then output the letter in its opposite case (Upper/Lower) using functions. I'm fairly sure the code i have written will work, just as soon as i figure out this problem. I don't currently know how to fix it myself, so help would be appreciated.
The code is:
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include <iostream>

using namespace std;

char ToUpperCase ( char i ); //Declaring the functions so they can be called by the code.
char ToLowerCase ( char i );

int main ()
{	
	char input;		//Creating the variable for the letter.
	cout << "Enter a letter to have it's 'case' changed: ";
	cin >> input;	//Setting the variable.
	cout << endl;
	int I = input;	//Converting the letter into a distinguishable integer through a different variable.
	if ( 65 <= I, I <= 90)	//Checking the integer form of the letter to choose which case to change to.
	{
		cout << ToLowerCase (input) << endl; //Sends the letter to the function.
	}
	else if ( 97 <= I, I <= 122 ) //Same notes as the "if"
	{
		cout << ToUpperCase (input) << endl;
	}
	else
	{
		cout << "You have input an invalid character, please enter a letter (A-Z)."; 
		cin >> input;
	}	//Prompts the user to re enter a character. I believe I will need to add more code to this section later.
}		//I will know after I can test the entire program.

char ToLowerCase ( char i )	 //Function that changes an Upper case letter to a Lower case letter.
{
	int x = i;		//Converts letter into an integer.
	int I = 32 + x;		//Converts letter value to its opposite case's value.
	char output = I;	//Converts letter value of opposite case back to a character.
	return output;		//Returns the actual character.
}
char ToUppercase ( char i )
{
	int x = i;
	int I = x - 32;
	char output = I;
	return output;
}	//Same notes as previous function. 

I recieve the output:
1>------ Build started: Project: Navigating, Configuration: Debug Win32 ------
1>  ToupperTolower.cpp
1>ToupperTolower.obj : error LNK2019: unresolved external symbol "char __cdecl ToUpperCase(char)" (?ToUpperCase@@YADD@Z) referenced in function _main
1>C:\Users\xxdmboone\documents\visual studio 2010\Projects\M1L1\Debug\Navigating.exe : fatal error LNK1120: 1 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Could someone help me out? Please and thank you. : P
Last edited on
ToUpperCase
ToUppercase
I would miss something that simple... -_- Thank you very much : ).
Topic archived. No new replies allowed.