OK, I just have one more question. So i decided to not try to confuse myself by making all of these complicated scripts (for my level understanding of the C++ languge anyway) so i decided to make a simpler script, here it is:

So i tried compiling and running this script, and it highlighted the "cin >> x >> endl;" line (line 8)and the error message was "no match for 'operator>>' in '(&std::cin)->std::basic_istream<_CharT, _Traits>::operator>> [with _CharT = char, _Traits = std::char_traits<char>](((int&)(&x))) >> std::endl' ". Could someone tell me what this means? I have no idea at all why this wouldn't compile. BTW, i'm using the compiling program Dev-C++

That message from the compiler is Cplusplusinese for 'std::endl is an output only entity'. You can only send it to output streams. You're trying to read it from std::cin, which just isn't going to happen. Also, LoGiCaL__ already pointed out a flaw in the bracketing. You included a closing bracket after the if statement, without first opening it. Then when you got to your else clause, you did the complete opposite. This is going to cause the compiler to get all pissy.