I've tried a lot of combinations and have searched on the web for something useful but unfortunately I've found nothing useful.
This is for my homework. Only question I cannot answer out of 69 questions.
Four integer variables, pos1, pos2, pos3, pos4 have been declared and initialized. Write the code necessary to "left rotate" their values: for each variable to get the value of the successive variable, with pos4 getting pos1's value.
Example that I've tried:
int tempP1 = pos1;
int tempP2 = pos2;
int tempP3 = pos3;
int tempP4 = pos4;
pos4 = tempP1;
pos3 = tempP2;
pos2 = tempP3;
pos1 = tempP4;
⇒ Your code had an error during execution
⇒ Are you sure you want to use: tempP1
⇒ Are you sure you want to use: tempP2
⇒ Are you sure you want to use: tempP3
⇒ pos1 has wrong value
⇒ pos3 has wrong value
pos4 = tempP1; pos2 = tempP3; pos3 = tempP4; pos1 = tempP2;