answersLogoWhite

0

What is pointer to a structure?

User Avatar

Anonymous

15y ago
Updated: 8/17/2019

A pointer is a variable that holds address information. For example, in C++, say you have a Car class and another class that can access Car.

Then, declaring Car *car1 =new Car() creates a pointer to a Car object.. The variable "car1" holds an address location.

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

What is the difference between structure and pointer?

A structure is a collection of primitives or other structures. A pointer is a memory address. Comparison of the two is like comparing bowling balls to cinder blocks. You can say that a structure defines the layout of the data, while a pointer points to data that is a particular structure.


What is pointer to a member in objective c?

It is a pointer that points to a member of a structure.


What happens if we use an integer pointer as a member of structure instead of structure pointer?

By declaring an integer pointer you are declaring that any non-zero reference stored in the pointer is guaranteed to be an integer reference. In order to guarantee the reference is actually a structure, the pointer must be declared as such, because casting an integer to a structure can never be regarded as being type-safe.


How can one create a pointer to structure in C?

Create a pointer of the type (pointer to struct) and assign the address of an instance of the structure to your pointer: typedef struct x { /* ... */ }; struct x my_structure; struct x* ptr = &my_structure;


32 can you create a linked list with out structure pointer?

Not in C, no.


How can you use pointer is data structure?

Your question makes no sense.


How is structure type pointer variable declared?

struct thisorthat *ptr;


How is a structure type pointer variable declared?

struct thisorthat *ptr;


What is difference between pointer and structures?

pointer data type that carry address:of data type that has no name but both of them must have same data type. structures you can make your own data type: struct name put any data type you wants any functions.


How is a structure type pointer variable declared in c?

struct thisorthat *ptr;


What is an identify?

An identifier is nothing but a data type. It may variable, content, structure or a pointer.


Are structures and pointers related in c plus plus?

Not really, but you can have: - a pointer pointing to a structure (FILE * is an example) - a pointer pointing to a structure-member (eg: struct tm tm; int *ip= &tm.tm_year) - a structure-member that is a pointer (any type) Example: typedef struct TreeNode { struct TreeNode *left, *right; int data; } TreeNode; TreeNode *root = (TreeNode *)calloc (sizeof (TreeNode), 1);