Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

scope resulation operator :: in c++

#include <iostream>
using namespace std;
class X {
   public:
   static int count;
};
int X::count = 10;  // define static data member

int main () {
   int X = 0;   // hides class type X
   cout << X::count << endl;   // use static member of class X
}
Source by www.tutorialspoint.com #
 
PREVIOUS NEXT
Tagged: #scope #resulation #operator
ADD COMMENT
Topic
Name
3+6 =