fork download
  1. #include <iostream>
  2.  
  3. struct Test {
  4. const int value = 10;
  5. const int value2 = 99;
  6. };
  7.  
  8. int main() {
  9. Test var1;
  10. Test var2{777};
  11. std::cout << var1.value << " " << var1.value2 << " " << std::endl;
  12. std::cout << var2.value << " " << var2.value2 << " " << std::endl;
  13.  
  14. return 0;
  15. }
Success #stdin #stdout 0s 4188KB
stdin
Standard input is empty
stdout
10 99 
777 99