Linked Questions

5 votes
11 answers
819 views

Possible Duplicates: Why use pointers? Passing a modifiable parameter to c++ function Why would I want to have pointer parameters? The only reason I can see is for small functions to attempt to ...
user avatar
0 votes
3 answers
1k views

Possible Duplicate: Why use pointers? I've just got the hang of pointers and now my practice is to actively look of occasions to use pointers, and use them in every possible situation I can ...
Sally Anne's user avatar
0 votes
3 answers
1k views

Possible Duplicate: Why use pointers? I know what the C++ & does. but what can it be used for?
Daniel's user avatar
  • 6,862
-1 votes
2 answers
2k views

As someone new to programing (C++) , I came across pointer which gave me a headache doing it as I never seen the point of using it. I tried to look at other answer on stack overflow but it was a bit ...
koa rosales's user avatar
0 votes
1 answer
2k views

I don't understand the difference between using a pointer and using a normal variable. I'm learning linked lists in class so the use of pointers seems more straightforward since pointers are used to ...
gr33kbo1's user avatar
  • 299
-3 votes
1 answer
656 views

I started working with the C++ STL and I am learnimg about list. I know that in list<int> adj, adj is an object of list class in which int are stored. My doubt is, what is mean by *adj in list&...
shubhamjr's user avatar
  • 181
1 vote
6 answers
313 views

I'm diving into C++ coming from the worlds of Objective-C and Java. Java gave me all the OOP knowledge I have and Objective-C taught me about manual memory management. While adapting to C++ is easy (...
ruipacheco's user avatar
  • 16.7k
-1 votes
2 answers
91 views

I am a newbie c-coder, so this probably has a very simple answer. I understand the function of pointers and the dereferencing operator, but I'm not sure when they're actually useful? Basic example: ...
ScoutRr's user avatar
0 votes
0 answers
106 views

I'm comming from "java-world" and now I want to start learning C++. I know in C++ objects are created like variables without the key word "new" which is used in java, but I have often seen in OOP code,...
user avatar
0 votes
0 answers
57 views

I get that you need pointers for handling something that grows and shrinks dynamically. In instances where that isn't the case, to my understanding, you use pointers when: your object is too big to be ...
user14217972's user avatar
0 votes
0 answers
44 views

string (*add(string (*str)[10])) [10]; //function return a point to array of 10 string int main() { string s[10] = {"a","b","c","d","e","f","g","f","i","j"}; string (*str)[10] = &s; ...
JiangFeng's user avatar
427 votes
10 answers
354k views

I'm just starting out with pointers, and I'm slightly confused. I know & means the address of a variable and that * can be used in front of a pointer variable to get the value of the object that ...
Pieter's user avatar
  • 33.1k
29 votes
12 answers
16k views

What is the point of pointers in C++ when I can just declare variables? When is it appropriate to use them?
Babiker's user avatar
  • 18.9k
48 votes
6 answers
35k views

EDIT: A better title for this would be: polymorphism for large collections of objects without individual heap allocations. Suppose that I have a base class Animal with virtual functions and some ...
Andrei Bozantan's user avatar
6 votes
8 answers
5k views

I'm coming from C# and I'm learning C++ (with this tutorial) so I have a relatively insubstantial amount of knowledge on memory, but the only use I see in pointers is "saving space" and iterating ...
airplaneman19's user avatar

15 30 50 per page