Here is the way another person in my class was able to get the string idea to work:
Code:#include <iostream> #include <string> using namespace std; int main( ) { string numStr; cout << "Enter a four digit positive integer. "; cin >> numStr; cout << endl; cout << numStr[0] << endl; cout << endl; cout << numStr[1] << endl; cout << endl; cout << numStr[2] << endl; cout << endl; cout << numStr[3] << endl; cout << endl; return 0; }