I'm currently doing a task in a book but I seem to struggle with creating an Instance. I'll give you the quick version of my code. Also, I'm new here, therfore I'm sorry in advance for any errors in etiquette.
#include <iostream>
using namespace std;
class CShip
{
private:
int m_xPos;
int m_yPos;
int m_Energy;
public:
CShip();
}
// Constructor
CShip::CShip
{
m_xPos = 0;
m_yPos = 0;
m_Energy = 0;
}
int main()
{
// Pointer for the object
CShip *pPlayer = NULL;
// Create Instance on the Heap
// My problem: "Player" is marked as an error...';' was expected but every semicolon was set
pPlayer = new CShip Player;
return 0;
}