fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. struct stEstructura {
  5. int a, b;
  6. } estructura, *e;
  7.  
  8. int main() {
  9. estructura.a = 10;
  10. estructura.b = 32;
  11. e = &estructura;
  12.  
  13. cout << "puntero" << endl;
  14. cout << e->a << endl;
  15. cout << e->b << endl;
  16. cout << "objeto" << endl;
  17. cout << estructura.a << endl;
  18. cout << estructura.b << endl;
  19.  
  20. return 0;
  21. }
Success #stdin #stdout 0s 3296KB
stdin
Standard input is empty
stdout
puntero
10
32
objeto
10
32