1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
| //---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include <iostream.h>
#include <conio.h> // pour getch
//---------------------------------------------------------------------------
#pragma argsused
class point
{ int x,y;
void init ();
void affich ();
};
void point::init(void)
{ x=0;
y=0;
}
void point::affich(void)
{ cout<<"x = "<<x<<" et y = "<<y<<endl;
}
void main(void)
{ point point_test;
pt_test.init();
pt_test.affich();
getch();
}
//--------------------------------------------------------------------------- |