C++ How To Program Plus Mylab Programming With Pearson Etext -- Access Card Package (10th Edition)
Question
Book Icon
Chapter 9, Problem 9.3E
Program Plan Intro

Scope Resolution Operator:

In C++, the double colon “::” is called scope resolution operator. The purpose of the scope resolution operator is:

Expert Solution & Answer
Check Mark

Explanation of Solution

Explanation:

  • If, in a program, there is a local variable with the same name as global variable, then while compiling, the complier uses the local variable. In order to access the global variable, user must prefix the variable name with “:: variable name”.
  • To define a function outside a class.
  • If user wants to access static variables of a class.
  • If, in two classes, there are same variable names, then, to distinguish, scope resolution operator is used. That means, for multiple inheritance, scope resolution operator is used.

Want to see more full solutions like this?

Subscribe now to access step-by-step solutions to millions of textbook problems written by subject matter experts!
Students have asked these similar questions
what do you mean by main() function ?
-- Implement Logical disjunction (OR) using case expressions -- NOTE feel free to change the function declaration -- (pattern match on the arguments), just don't change -- the type decleration -- NOTE^2 You are NOT ALLOWED to use ||   please use elm
In a void function, how would you utilise a return statement?
Knowledge Booster
Background pattern image
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education