Search
 
SCRIPT & CODE EXAMPLE
 

CPP

free a pointer c++

myPointer = new int;
delete myPointer; //freed memory
myPointer = NULL; //pointed dangling ptr to NULL
Comment

PREVIOUS NEXT
Code Example
Cpp :: how to make a pointer point to a the last value in an array 
Cpp :: c++ define function pointer 
Cpp :: cin c++ 
Cpp :: copy vector c++ 
Cpp :: c++ switch case 
Cpp :: how to rotate a matrix 90 degrees clockwise 
Cpp :: public method 
Cpp :: memset function in c++ 
Cpp :: cpp language explained 
Cpp :: initialisation of a c++ variable 
Cpp :: virtual function in c++ 
Cpp :: kmp c++ 
Cpp :: conversion of class type data into basic type data in c++ 
Cpp :: front priority queue cpp 
Cpp :: rc.local not running centos 6 
Cpp :: c++ convert int to string with a fixed number of digits 
Cpp :: taking integer input from file in c++ 
Cpp :: top array data structure questions in inteviews 
Cpp :: ejemplo 
Cpp :: Variabili globali c++ 
Cpp :: identity 
Cpp :: define for loop c++ 
Cpp :: transpose function example in c++ 
Cpp :: check whether kth bit is 1 
Cpp :: Create an algorithm to identify what is the next largest element on a stack (using stack/queue operations only) INPUT: [ 10, 3, 1, 14, 15, 5 ] OUTPUT: 10 - 14 3 - 14 1 - 14 14 - 15 15 - -1 5 - -1 
Cpp :: loops in c++ with example 
Cpp :: can you add a bool and an int 
Cpp :: error c4001 
Cpp :: cudaMalloc 
Cpp :: displaying m images m windows opencv c++ 
ADD CONTENT
Topic
Content
Source link
Name
6+9 =