- #1
AST3019
- 5
- 0
So I am trying to use for loops to shift the index an array by a user inputted value. The code i have so far is
printMessage();
cin >> choice;
if(choice == 2){
cout << endl;
cout <<"Please enter the desired number of shifts:" << endl;
cin >> b;
int s;
for (s = 0; s == b;s++) {
cout << message[s + b];
}
}
When I try to compile it, it doesn' cout the message. The input from the message occurs earlier in the code.
printMessage();
cin >> choice;
if(choice == 2){
cout << endl;
cout <<"Please enter the desired number of shifts:" << endl;
cin >> b;
int s;
for (s = 0; s == b;s++) {
cout << message[s + b];
}
}
When I try to compile it, it doesn' cout the message. The input from the message occurs earlier in the code.