Hi i strated with c++ yesterday. know im trying to make a script that enter your date of bearth and check it of its correct (more script will come later). Now i create this script:
It works good but when your press a letter ore something its keeps couting "jaar:" without anything. Im probaly making a mistake somewhere please help me.Code:#include <iostream> using namespace std; int main(){ int jaar; for(int x=0; x<1;){ if(jaar <1 && jaar > 2004){ x=1; } else{ cout<<"Jaar:"; cin>> jaar; cin.ignore(); } } cout<<jaar; cin.get(); }