   Functions and Scope problem
  I'm currently trying to make a program that will change a lower case to upper case and vice versa so far I have this:   as a side note this is C++ code#include <iostream>using namespace std;char input;char ToUpperCase(char input){  if (input > 65 && input < 90)  {  input += 32;  }  return input;}int main(){cout << "Enter a letter: ";cin >> input;cout << input << endl;}My problem is how do I make ToUpperCases(s) variable 'input' understand main() variable input.   
  Behold, the function call!int main(){    cout << "Enter a letter: ";    cin >> input;    cout << ToUpperCase(input) << endl;    return 0;};#include <iostream>using namespace std;//char input; <-- get rid of this global variablechar ToUpperCase(char input){  if (input > 65 && input < 90)  {  input += 32;  }  return input;}int main(){char input;//make a local variable herecout << "Enter a letter: ";cin >> input;input = ToUpperCase( input );//pass this local variable into your function, and then set it to the return valuecout << input << endl;};  Okay I guess now I know that theres something wrong with my function ToUpperCase() because it's still not changing it from upper case to lower caseEDIT: btw when i get rid of the global variable input I get undeclared identifier errors   ;  Nevermind just seen hodgman's post.. I did that and it still doesn't want to transform the letters   ;  blah nevermind see the problem, thanks all!   