Jak mogę korzystać z funkcji nie należącej do klasy, w funkcji do niej należącej. Chodzi mi o fukncję gotoxy:
#include <iostream>
#include <windows.h>
using namespace std;
class postac
{
public:
int x;
int y;
int funkcja(int &x, int &y);
void gotoxy(int x, int y);
};
int main()
{
postac bohater;
bohater.x = 10;
bohater.y = 10;
}
int funkcja(int &x, int &y)
{
gotoxy(32,11);
};
void gotoxy(int x, int y)
{
COORD c;
c.X = x - 1;
c.Y = y - 1;
SetConsoleCursorPosition (GetStdHandle(STD_OUTPUT_HANDLE), c);
}