Problem Solving with C++ (10th Edition)
Problem Solving with C++ (10th Edition)
10th Edition
ISBN: 9780134448282
Author: Walter Savitch, Kenrick Mock
Publisher: PEARSON
Question
Book Icon
Chapter 12.2, Problem 9STE
Program Plan Intro

Namespace:

  • Namespace is a group of name definitions.
    • It contains definition of class and declaration of variable.
  • Generally, the namespace in C++ is used in the ways of “std” namespace. The “std” namespace contains each and every names defined in the standard library files that user use such as “iostream” and “sdtdlib”.
  • If the user do not put the code in some exact namespace, then then code in a namespace called “global namespace”.
    • In this namespace, the directive “using” does not used.
  • Consider a name that is defined in two namespaces. When the user tends to use the namespaces that are defined that is if the user uses both namespace, then the resultant that is obtained will contain error in it.

Blurred answer
Students have asked these similar questions
What are the two errors in my pseudocode?Module getAverage(Integer value1, Integer value2, Integer value3)                 Declare Integer average                 average = value1 + value2 + value3 / 3                 Display average            End Module
Where did I make an error in my pseudocode module???Code:Module main()                 Call raiseToPower(2, 1.5)            End main              Module raiseToPower(Real value, Integer power)                 Declare Real result                 Set result = value ^ power                 Display result            End raiseToPower
Why does my pseudocode not perform what I asked? Don't know whats wrong with it.// This program asks the user to enter a value             // between 1 and 10 and validates the input.             Declare Integer value                         // Get a value from the user.             Display "Enter a value between 1 and 10."             Input value               // Make sure the value is between 1 and 10.             While value < 1 AND value > 10                         Display "ERROR: The value must be between 1 and 10."                         Display "Enter a value between 1 and 10."                         Input value             End While
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781305480537
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Text book image
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage