Professional Documents
Culture Documents
1.6.1 Scope Resoln Optr
1.6.1 Scope Resoln Optr
1.6.1 Scope Resoln Optr
POLYTECHNIC, KOPARGAON
With NBA ACCREDIATED programs , Approved by AICTE, New Delhi,
Recognized by Govt. of Maharashtra, Affiliated to Maharashtra State Board of Technical Education, Mumbai,
ISO 9001:2015 Certified Institute
Name of Subject:- Object Oriented Programming Using C++ MSBTE Subject Code:- 22316
Chapter 1: Principles of OOP
9) TALK Functions talk with other by Objects talk each other through functions
exchanging data in diff. forms
syntax of
Control
Structures
is
same as
C
Sanjivani K.B.P. Polytechnic, Kopargaon Department of Compute Technology P. M. Dhanrao 9
1.6) Scope resolution operator ::
memory management operators (new delete)
•
Syntax: :: var_name
Exa- cout<<"\nInside main global m = "<<::m;
• int m=10;
• int main()
• { clrscr();
• cout<<"\nIN MAIN GLOBAL m="<<::m;
• int m=20;
• cout<<"\nMAIN FUNCION's m = "<<m;
• {
• int m=30;
• cout<<"\nMAIN INNER BLOCK's { m = "<<m<<" }";
• cout<<"\nMAIN INNER BLOCK { global m = "<<::m;
•}
Sanjivani K.B.P. Polytechnic, Kopargaon Department
11
of Compute Technology P. M. Dhanrao