Top "Pointers" questions

Data type that "points to" another value stored in memory.

Function Pointers in Java

This may be something common and trivial, but I seem to be having trouble finding a concrete answer. In C# …

java pointers delegates function-pointers
How to print variable addresses in C?

When i run this code. #include <stdio.h> void moo(int a, int *b); int main() { int x; …

c pointers memory-address
How to compare pointers?

Suppose I have 2 pointers: int *a = something; int *b = something; If I want to compare them and see if they …

c++ pointers
C++ pass an array by reference

is this allowed to pass an array by reference ? void foo(double& *bar) Seems that my compiler says no. …

c++ arrays pointers reference pass-by-reference
What are the rules for casting pointers in C?

K&R doesn't go over it, but they use it. I tried seeing how it'd work by writing an …

c pointers casting
Passing references to pointers in C++

As far as I can tell, there's no reason I shouldn't be allowed to pass a reference to a pointer …

c++ pointers reference
What's the difference between a null pointer and a void pointer?

Whats the difference between a Null pointer & a Void pointer?

c pointers
When to use malloc for char pointers

I'm specifically focused on when to use malloc on char pointers char *ptr; ptr = "something"; ...code... ...code... ptr = "something else"; …

c pointers malloc char
What does `dword ptr` mean?

Could someone explain what this means? (Intel Syntax, x86, Windows) and dword ptr [ebp-4], 0

assembly x86 dword pointers
Dynamically allocating an array of objects

I have a class that contains a dynamically allocated array, say class A { int* myArray; A() { myArray = 0; } A(int size) { …

c++ memory-management pointers destructor copy-constructor