I'm trying to make a simple console app that asks for your age and replies differently deppending on the awnser. here is my code so far.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#include <iostream>
int main() {
int iAge;
std::cout << "How old are you?" << std::endl;
std::cin >> iAge;
if (iAge = 999) {
std::cout << "You are the same age as I am." << std::endl;
System::Console::ReadLine();
} else {
std::cout << "You are " << iAge << " years old." << std::endl;
System::Console::ReadLine();
}
return 0;
}
but whatever i type i get the first awnser. any help?