fork(4) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. class test1 {
  5. static const int a = 0;
  6. };
  7.  
  8. class test2 {
  9. const int a;
  10. };
  11.  
  12.  
  13. int main() {
  14. // your code goes here
  15. cout << "test1 : " << sizeof(test1) << endl;
  16. cout << "test2 : " << sizeof(test2) << endl;
  17. return 0;
  18. }
Success #stdin #stdout 0s 3296KB
stdin
Standard input is empty
stdout
test1 : 1
test2 : 4