On page 43, when I change from
int x = 255; printf("x is %d.\n", x);
int x = 255; printf("x is %d.\n", x); printf("In octal, x is %o.\n", x); printf("In hex, x is %x.\n", x);
and click Run, I only get the result
I didn’t know what happened to the result
In octal, x is 377.
In hexadecimal, x is ff.
I selected the additional lines, pressed Command-X to Cut the lines, clicked Run, then pressed Command-V to Paste the lines back in, and clicked Run again. And then I saw the expected results.
I thought I was crazy and just thought I clicked Run, until I experienced something similar in chapter 7 when I ran the first “Aaron is cool” loop, and only got the result
I changed “int i = 0” to “int i = 5”, clicked Run, and got my expected results.
Then I changed it back to “int i = 0”, clicked Run, and got my expected results.
What’s going on? Is Xcode going to slowly drive me insane? Should I bail out now?
Do I need to Save before I click Run?