Im new to c++, Ive been plowing through books,web,etc. Many of the things im learning seems redundant but being new as I am I figure that it stems from lack of knowledge. Now finally my questions...Whats the significance of using pointers to reference variables when i could just flat out write[ int k =3;] for example. Question 2 why is so much emphasize on space allocation? My last question is are there things I should learn before attempting to learn c++? ps have attachements I made cant tell the which is better.
suppose in your date example that you wanted to make a calendar for all your arrangements the coming year. Let's say you have 200 arrangements already. You're not going to make 200 individual variables, each with different names. Instead, you would allocate room for one big variable containing 200 arrangements, and then simply save the address of this allocation.
In that example it is both clear why allocating memory is important (we are basically just storing information, doing stuff to it, and storing it again. notice how many times "storing" comes up in that explanation), and knowing where we put it.
I know the above explanation is not perfect, but if you start making programs you should soon notice that you care quite a lot about these things.
Miturian, Im starting to see how that would be more effective and less time consuming. If possible could you revise my date file with an example of your own allocating the space for 200 vars. Im hoping I could use it as a study guide.
Fbody im viewing the link you pointed out but it has terms that's unknown to me at this stage in my c++ journey so I just end up deciphering the code that looks familiar not really getting a clear understanding but thx anyway.
Fbody Ive finished decipher the code from the first link youve referenced. Correct me if im incorrect but it seem to me that its more clean and precise to use pointers allowing functions to use the objects desired without adding size to the code vs making a copy of the object (which can get pretty big) every time i want to be able to use it in my code. Is that the significance of pointers??
YES!!Its is way more comprehensible and has code to try out to give more meaning to the topic being discussed. It makes mention of hexadecimal notation, is that something I needed to learn to be fully versed in c++. If so could you point out a link for that?
Hexadecimal (base-16) notation is actually pretty simple to understand. The representations of the numbers just take some getting used to (like anything else). It just uses 0-9 and a-f (representing 10-15) instead of simply just 0-9 (decimal).