So far I have learned the basics of C++. Let me share some of what I have learned.
typedef unsigned int uint;
What does this mean? Well basically int has a set range of values and we can change that range using unsigned int. This does not change the size of int but just changes the range of int. So instead of writing unsigned int we can just write uint when coding.
I think I have a better understanding of loops and arrays at this point in C++ then when I tried to learn C# a couple of years back. Still I am at the end of Ch. 2 and I am not where I would personally want to be. I know that some information is just being mentioned now and I will continue to implement them as I keep coding and that it will become second nature. I just must be patient. This is something that I really want to learn and hopefully I can build my first game some day soon. I must just keep learning and keep coding. I will become one with the Matrix!!!
Subscribe to:
Post Comments (Atom)
1 comment:
think of all int types being "signed", meaning, that they accept negative values (thus having a negative range). When you explicitly declare an int being UNSIGNED... that means that negative values are not allowed. This allows the extra bits to represent an even higher bound on the positive side. For instance, char range [-128, 127], while unsigned char range [0, 255].
Post a Comment