I coded this to test FOR loops, but whenever I enter YES it crashes.
Code:// Includes the basic IO functions. #include <iostream.h> #include <string.h> // This program is coded simply to test the FOR loop in Visual C++. int main(void) { char * response; cout << "Ready to begin? Type YES if you are."; cin >> response; if (response == "YES" || response == "yes") { cout << "This is the loop:" << endl; for (int x = 0; x < 100; x++) { cout << x << endl; } return 0; } else { cout << "Very well. Program terminating."; } return 0; }