Created
September 27, 2017 15:11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int main() | |
{ | |
cout << "Comienza el mundo.." <<endl; | |
Persona uno; | |
Persona dos ("Luis",5000); | |
Persona * tres = new Persona("Fermín el puntero", 400); | |
for (int i=0; i< 10; i++) cout << i << ", "; | |
cout << endl; | |
//tres es un puntero a Persona. Si no se destruye manualmente la memoria que | |
//ocupa se perderá una vez terminado el programa. | |
//delete tres; | |
cout << "... y aquí se acaba" <<endl; | |
return 0; | |
cout << "Después del return no se ejecuta nada" << endl; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment