Untitled
unknown
plain_text
2 years ago
283 B
10
Indexable
#include <iostream>
using namespce std;
class sample{
public:
static int a;
static void getdata()
{
cout<<a<<endl;
}
};
int sample :: a=10;
int main()
{
sample s;
cout<<sample::getdata()<<endl;
sample::a=100;
cout<<sample::getdata<<endl;
}Editor is loading...