C++ – Pointer to Structure
Pointer to structure in C++ can also be referred to as Structure Pointer. A structure Pointer in C++ is defined as the pointer which points to the address of the memory block that stores a structure. Below is an example of the same:
struct name_of_structure *ptr; // Initialization of structure is done as shown below ptr = &structure_variable;
In the above code g is an instance of struct point and ptr is the struct pointer because it is storing the address of struct point.