fork download
  1.  
  2. int main() {
  3. char Mes[][11] = { "Enero", "Febrero", "Marzo", "Abril",
  4. "Mayo", "Junio", "Julio", "Agosto",
  5. "Septiembre", "Octubre", "Noviembre", "Diciembre"};
  6. char *Mes2[] = { "Enero", "Febrero", "Marzo", "Abril",
  7. "Mayo", "Junio", "Julio", "Agosto",
  8. "Septiembre", "Octubre", "Noviembre", "Diciembre"};
  9.  
  10. cout << "Tamaño de Mes: " << sizeof(Mes) << endl;
  11. cout << "Tamaño de Mes2: " << sizeof(Mes2) << endl;
  12. cout << "Tamaño de cadenas de Mes2: "
  13. << &amp;Mes2[11][10]-Mes2[0] << endl;
  14. cout << "Tamaño de Mes2 + cadenas : "
  15. << sizeof(Mes2)+&amp;Mes2[11][10]-Mes2[0] << endl;
  16.  
  17. return 0;
  18. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:8:56: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
       "Septiembre", "Octubre", "Noviembre", "Diciembre"};
                                                        ^
prog.cpp:8:56: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
prog.cpp:8:56: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
prog.cpp:8:56: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
prog.cpp:8:56: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
prog.cpp:8:56: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
prog.cpp:8:56: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
prog.cpp:8:56: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
prog.cpp:8:56: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
prog.cpp:8:56: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
prog.cpp:8:56: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
prog.cpp:8:56: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
prog.cpp:10:4: error: ‘cout’ was not declared in this scope
    cout << "Tamaño de Mes: " << sizeof(Mes) << endl; 
    ^
prog.cpp:10:49: error: ‘endl’ was not declared in this scope
    cout << "Tamaño de Mes: " << sizeof(Mes) << endl; 
                                                 ^
prog.cpp:13:13: error: ‘amp’ was not declared in this scope
         << &amp;Mes2[11][10]-Mes2[0] << endl; 
             ^
prog.cpp:13:36: error: invalid operands of types ‘char’ and ‘char*’ to binary ‘operator-’
         << &amp;Mes2[11][10]-Mes2[0] << endl; 
                                    ^
prog.cpp:15:49: error: invalid operands of types ‘char’ and ‘char*’ to binary ‘operator-’
         << sizeof(Mes2)+&amp;Mes2[11][10]-Mes2[0] << endl;
                                                 ^
stdout
Standard output is empty