Skip over navigation

Contents

Pointers and Basic Structures in C++

Problems

Other Data Structures

How to Cite This SparkNote

Problem : What is a linked list?

A linked list is a structure of unspecified size which contains "links" that hold values and a reference to the next "link."

Problem : What does the new operator do?

The new operator allocates memory for a variable to which a pointer will point.

Problem : What is the meaning of NULL?

The value NULL means that a pointer does not point to a valid memory location.

Problem : What is the difference between the "." operator and the "->" operator?

Both are used to access members of structs and objects, but the dot operator is for normal instances of the struct type whereas the "->" operator is used on pointers to structs or objects.

Problem : When would you use a multidimensional array?

It makes sense to use a multidimensional array when a system of values requires more than one index. A matrix, for example, requires specification of both a row and a column.

Follow Us