fork(4) download
  1. #include <iostream>
  2. using namespace std;
  3. class Foo{
  4. public:
  5. Foo():A({0,}){}
  6.  
  7. void Show(){
  8. for(auto& o:A){
  9. std::cout<<o<<',';
  10. }
  11. }
  12. private:
  13. int A[100];
  14. };
  15. /*
  16. struct A{
  17. int B[100];
  18. char C;
  19. };
  20.  
  21. class Foo{
  22. public:
  23.   Foo():a({{0,},0}){}
  24.  
  25.   void Show(){
  26.   for(auto& o:a.B){
  27.   std::cout<<o<<',';
  28.   }
  29.   }
  30. private:
  31. A a;
  32. };
  33. */
  34. int main() {
  35. // your code goes here
  36. Foo F;
  37. F.Show();
  38. return 0;
  39. }
Success #stdin #stdout 0s 4332KB
stdin
Standard input is empty
stdout
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,