+ 1

I don't understand Pointers Could someone please explain it to me

I'm kind of a beginner to c++ so could you explain it easily

8th Jan 2017, 2:45 AM
Chinny A
Chinny A - avatar
4 Respuestas
+ 3
@Idun Blatant copy and paste of someone else's answer is not an answer.
12th Jan 2017, 1:28 AM
Kevin Gilkey-Graham
Kevin Gilkey-Graham - avatar
+ 2
Pointers are the memory locations where a value is being stored. In most cases you would pass a a current value of a variable to a function to be handled. That function would then return some result to you which you might then put back into the original variable or do something else with it. imagine you had a friend who knows how to do something. You want to tell him to do that thing once for all the people in line. The current count of people in line is stored in variable count. You can tell your friend to do his job 'count' times or you can tell your friend how to read 'count' and therefore know how many people are still in line on his own.
9th Jan 2017, 6:14 AM
Kevin Gilkey-Graham
Kevin Gilkey-Graham - avatar
0
@Kevin Graham Can u provide a simple analogy on functions and why it's needed in c++ , I understand how to use it now but not sure why we need it in c++
12th Jan 2017, 3:30 AM
Chinny A
Chinny A - avatar
- 3
Pointers are the memory locations where a value is being stored. In most cases you would pass a a current value of a variable to a function to be handled. That function would then return some result to you which you might then put back into the original variable or do something else with it. imagine you had a friend who knows how to do something. You want to tell him to do that thing once for all the people in line. The current count of people in line is stored in variable count. You can tell your friend to do his job 'count' times or you can tell your friend how to read 'count' and therefore know how many people are still in line on his own.
11th Jan 2017, 8:42 PM
Idun Maria
Idun Maria - avatar