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:
#include <iostream>
using namespace std;
int main () {
int x;
cout << "what is x?" << endl;
cin >> x >> endl;
if (x == 2)
cout << "you entered a two!" << endl;
} else {
cout << "you entered a one!" << endl;
cin.get();
return 0;
}
------------------------------------------------------------------
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++



