Top "Pointers" questions

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

Reason to Pass a Pointer by Reference in C++?

Under which circumstances would you want to use code of this nature in c++? void foo(type *&in) {...} void …

c++ pointers reference
Testing pointers for validity (C/C++)

Is there any way to determine (programatically, of course) if a given pointer is "valid"? Checking for NULL is easy, …

c++ c validation pointers null
Pass by pointer & Pass by reference

Possible Duplicate: What are the differences between pointer variable and reference variable in C++? Are there benefits of passing by …

c++ pointers reference parameter-passing
Function pointer as parameter

I try to call a function which passed as function pointer with no argument, but I can't make it work. …

c++ function pointers function-pointers
How to printf a memory address in C

My code is: #include <stdio.h> #include <string.h> void main() { char string[10]; int A = -73; …

c pointers printf memory-address unary-operator
Can I use if (pointer) instead of if (pointer != NULL)?

Is it safe to check a pointer to not being NULL by writing simply if(pointer) or do I have …

c++ pointers if-statement null null-pointer
Meaning of *& and **& in C++

I found these symbols in a function declaration several times, but I don't know what they mean. Example: void raccogli_…

c++ pointers syntax reference symbols
How to avoid memory leaks when using a vector of pointers to dynamically allocated objects in C++?

I'm using a vector of pointers to objects. These objects are derived from a base class, and are being dynamically …

c++ stl pointers vector derived
Why can a string be assigned to a char* pointer, but not to a char[] array?

Can someone explain why this works with the pointer: char * str1; str1 = "Hello1"; str1 = "new string"; // but not this char …

c string pointers initialization reusability
C Programming: malloc() inside another function

I need help with malloc() inside another function. I'm passing a pointer and size to the function from my main() …

c function pointers malloc