Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

Heap pinter c++

void func()
{
    int *p = new int;            // automatic pointer to dynamic object
    int q;                       // automatic object
    int *r = &q;                 // automatic pointer to automatic object
    static int *s = p;           // static pointer to dynamic object
    static int *s = r;           // static pointer to automatic object (bad idea)
    thread_local int **t = &s;   // thread pointer to static object 
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Heap #pinter
ADD COMMENT
Topic
Name
4+9 =