Thursday, September 18, 2008

C...learning: Chapter 3 of 8 - Left 2ond Part "Arrays and Pointers"

I have to admit that the 2ond part of chapter 3 reffering to pointers usance in arrays was difficult. I couldn't get the usance of all those things.

I won't be losing time. If there is something from those elements that will be used in the book for Game Programming I will mind then but now these things may be of little use for there and so I won't be losing time learning them.

I will proceed to chapter 4 "Functions"

P.S.
During my experiments with arrays I've learned some new things about the "%" operator and for.
This operator does not declare the end of the text to set a numbe but rather it can;t be set between text as it declares the position within text where the variable -that is declared after the brackets- is going to be set.

So when you want to put 2 variables between the text you do this
printf ("Cell %d is %d",i, matrix1[i]);

and not what I've first tried
printf ("Cell %d",i,"is%d",matrix1[i]);

Now what I've discovered about for is that after the parentesis if you put ";" then its like having an empty statement (having nothing between the brackets "{}")

Another great thanks to the forums

No comments: