Thanks for the 'Variables' website, I was able to declare 'y = 2' globally and call a modification of the variable from another function, from what I read.
For any other noobs who might be interested, this it how it worked.
Code:
#include <iostream.h>
using namespace std;
int y = 2;
void myfunc();
int main()
{
int x;
x = 1023;
cout << "this program prints the value of x: ";
cout << x;
cout << "\n";
cout << "This line will print the value of y: ";
cout << y;
cout << "\n";
myfunc();
cout << "\n";
system("PAUSE");
return 0;
}
void myfunc()
{
cout << "This line will print out the value of line y+1: ";
cout << y + 1;
}
Code:
this program prints the value of x: 1023
This line will print the value of y: 2
This line will print out the value of line y+1: 3
Press any key to continue...
Thanks again dude.