#include<iostream>
class cmd
{
public:
void gotoxy(int x, int y);
};
cmd::void gotoxy(int x, int y)
{
COORD c;
c.X = x - 1;
c.Y = y - 1;
SetConsoleCursorPosition (GetStdHandle(STD_OUTPUT_HANDLE), c);
}
int main()
{
kod programu
}
-------------------------------------------------------------------------
Mam pytanie jak zrobić by program wyglądał tak:
#include<iostream>
#include<klasa_CMD>
int main()
{
kod
}
Czyli nie chciałbym w głównym programie widzieć deklaracji klas i opisu metod.
Czy przez include można dołączać w ten sposób ?