fork(20) download
  1. #include <iostream>
  2. #include <string>
  3. struct ABC
  4. {
  5. std::string str;
  6. unsigned int id=0; // in class member initializer
  7. };
  8.  
  9. int main()
  10. {
  11. ABC abc{"hi", 0};
  12. std::cout << abc.str << " " << abc.id << std::endl;
  13. return 0;
  14. }
Success #stdin #stdout 0s 3412KB
stdin
Standard input is empty
stdout
hi 0