I kinda know what this means, but I dont know how to fix it.. Any ideas?
warning C4700: uninitialized local variable 'counter' used
warning C4700: uninitialized local variable 'matchcount' used
int counter
for (int counter = 1; counter <= 10; counter++)
cout << "Enter a number for place " << counter << ": ";
...
if ( numx == counter )
matchcount++;
I'm not sure if you can see if, but you have a few problems here.
1. You define int counter twice. Once at line 20 and once at line 22. This means that you have a version of counter in your for loop and a version outside of your for loop, they are not the same variable. To fix: change line 22 to: for ( counter = 1; counter <= 10; counter++)
2. You use matchcount++ without ever setting matchcount first. We have no idea what matchcount was during our first iteration and so incrementing it to another value won't do anything for us. To fix: change line 19 to: int matchcount = 0;
3. You are missing {} brackets from your for loop. The only part which is currently looped is the cout in line 24. I think you need a { at line 23, and a } between lines 29 and 30.
4. Remove int _tmain(int argc, _TCHAR* argv[]), or move your entire code to that function and remove int main(). The two functions are supposed to be the same thing.