Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
static property
//g++ 5.4.0 #include <iostream> using std::cout ; struct Math{ static double Pi; static int pow(int base, int n); }; double Math::Pi = 3.1415926; int Math::pow(int b, int n){ int ans = 1; while(n--){ ans *= b; } return ans; } int main() { int r = 10; cout<< Math::pow(r,2) * Math::Pi; return 0; }
run
|
edit
|
history
|
help
0
sysFork3
semiprog.cpp
abraham
topological sort
AgeGroupHisto
merge-sort
stlsizeof.cc
google
Clementina
Functions-Part I