Dynamic Memory Allocation Base And Liit Code Example


Example: dynamic memory allocation

int *p = new int; // request memory *p = 5; // store value  cout << *p << endl; // Output is 5  delete p; // free up the memory  cout << *p << endl; // Output is 0

Comments

Popular posts from this blog

Chemistry - Bond Angles In NH3 And NCl3

Are Regular VACUUM ANALYZE Still Recommended Under 9.1?

Change The Font Size Of Visual Studio Solution Explorer