First commit 13/02/1995
This commit is contained in:
24
CLASS.CPP
Normal file
24
CLASS.CPP
Normal file
@ -0,0 +1,24 @@
|
||||
#include <iostream.h>
|
||||
|
||||
class Prueba {
|
||||
|
||||
public:
|
||||
|
||||
Prueba( int X, int Y ){ cout<<"\nObjeto creado con X:"<<X<<", Y:"<<Y; };
|
||||
~Prueba(){ cout<<"\n Objeto destruido" ; };
|
||||
|
||||
private:
|
||||
int x;
|
||||
int y;
|
||||
};
|
||||
|
||||
|
||||
void main(void)
|
||||
{
|
||||
Prueba *p;
|
||||
|
||||
p = new Prueba(5,9);
|
||||
|
||||
|
||||
delete p;
|
||||
}
|
Reference in New Issue
Block a user