C++ for Engineers and Scientists
C++ for Engineers and Scientists
4th Edition
ISBN: 9781133187844
Author: Bronson, Gary J.
Publisher: Course Technology Ptr
bartleby

Concept explainers

bartleby

Videos

Textbook Question
Book Icon
Chapter 9.6, Problem 3E

(For thought) a. What’s an advantage of namespaces?

b. What’s a possible disadvantage of namespaces?

Blurred answer
Students have asked these similar questions
(c) Does an integer pointer store an integer itself or something else? (d) What is the purpose of pointers? What do they allow us to do? What would happen if we didn't have pointers?
The issues:Memory leaks, bad pointers, and writing to the end of the memory allotted.When it comes to memory management, C++ offers a tonne of freedom. You can directly work with pointers and allocate and deallocate memory. Flexibility entails a price. You can make mistakes with allocations because the language lets you do so. The usage of pointers and deallocation are both subject to error. What can you do to secure your code because C++ lacks built-in safety checks?
The Issues: Bad pointers, writing to the end of allotted memory, and memory leaks are all possibilities.When it comes to memory management, C++ provides a great deal of freedom. You can allocate and deallocate memory as well as directly manage pointers. Flexibility comes at a price. Because the language permits you to allocate memory, you can make mistakes. Similarly, you may mess up deallocation and pointer usage. What do you do to secure your code in C++ when there are no built-in safety checks?
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Computer Fundamentals - Basics for Beginners; Author: Geek's Lesson;https://www.youtube.com/watch?v=eEo_aacpwCw;License: Standard YouTube License, CC-BY