Complete Modern C++ - Make Functions

Complete Modern C++ - Make Functions

Assessment

Interactive Video

Information Technology (IT), Architecture

University

Hard

Created by

Quizizz Content

FREE Resource

The video tutorial explains the use of smart pointers in C++ and emphasizes avoiding direct use of new and delete operators. It introduces make_unique and make_shared functions for creating unique and shared pointers, respectively, without manual memory allocation. The tutorial highlights the advantages of these functions, such as reducing multiple calls to new and delete, and discusses their limitations, including the inability to specify custom deleters.

Read more

3 questions

Show all answers

1.

OPEN ENDED QUESTION

3 mins • 1 pt

How can you construct a unique pointer for a dynamic array?

Evaluate responses using AI:

OFF

2.

OPEN ENDED QUESTION

3 mins • 1 pt

What happens during the destruction of a shared pointer created with 'make_shared'?

Evaluate responses using AI:

OFF

3.

OPEN ENDED QUESTION

3 mins • 1 pt

What are the limitations of using 'make' functions for smart pointers?

Evaluate responses using AI:

OFF