Код: Выделить всё
#include "stdafx.h"
#include <conio.h>
class charlocus
{
int x,y;
char cc;
friend void friend_put(charlocus *, char );
public:
charlocus(int xi, int yi, char ci)
{
x=xi;
y=yi;
cc=ci;
}
void display()
{
_putch(cc);
}
};
void friend_put(charlocus *p, char c)
{
//передвинуть курсор в точку x,y
p->cc = c;
}
void main()
{
charlocus D(55,55,'D');
charlocus S(20,20,'S');
D.display();
getch();
S.display();
getch();
friend_put(&D, '*');
D.display();
getch();
friend_put(&S, '#');
S.display();
getch();
}
может у кого нить есь какие нибудь советы, предложения?
буду очень рада их выслушать...