#ifndef MOVE_H
#define MOVE_H
class moveClass {
private:
int cursX;
int cursY;
char moveChar;
public:
void startProgram();
};
#endif
~
~
I get the following error:
undefined reference to `moveClass::startProgram()'
collect2: ld returned 1 exit status
Please explain to me what the problem is, and then how to fix it.
If you are using an IDE, make sure that move.cpp is added to the project.
If you are compiling from the command line, make sure that move.cpp is compiled and linked properly.
Exactly how this is done depends on the compiler. In GCC you can do