Scope resolution

What is scope resolution in C++ and object oriented ?

Questions by Usha anbu

Showing Answers 1 - 6 of 6 Answers

Gothic

  • Feb 24th, 2009
 

#include using namespace std;
int amount = 123;
// A global variable int
main()
{
int amount = 456;
// A local variable
cout << ::amount << endl
// Print the global variable with Scope
Reso << amount << endl;
// Print the local variable
}

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions