Horje
dynamic memory in c++ Code Example
dynamic memory in c++
#include <iostream>

int main()
{
  int* ptr = new int(5);
  
  int* arr = new int[3];
  arr[0] = 96;
  arr[1] = 45;
  arr[2] = 72;
  
  std::cout << *ptr << "\n";// output: 5
  
  for (int i = 0; i < 3; i++)
  {
    std::cout << arr[i] << " ";
  } // output: 96 45 72
}




Cpp

Related
Inner Section Sticky Scroll in elementor Code Example Inner Section Sticky Scroll in elementor Code Example
std::map get all keys Code Example std::map get all keys Code Example
c++ random int troll Code Example c++ random int troll Code Example
the code execution cannot proceed because glew32.dll was not found Code Example the code execution cannot proceed because glew32.dll was not found Code Example
glew32.dll was not found Code Example glew32.dll was not found Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
9