Zej
Aug 23rd, 2000, 04:39 PM
having trouble them them!! :mad:
this program has no purpose except to teach me about classes (incase you're wondering :D)
CPlayer Class
// Player.cpp: implementation of the CPlayer class.
//
//////////////////////////////////////////////////////////////////////
#include "iostream.h"
#include "Player.h"
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CPlayer::CPlayer()
{
}
CPlayer::~CPlayer()
{
}
void CPlayer::jump()
{
cout << "Player jumped!";
}
Now here is the main part of my code.
#include <iostream>
using namespace std;
void main()
{
CPlayer guy;
guy.jump(); // The guy suppose to JUMP here but he doesn't!!!
}
for some reason this ain't working so could someone spot a mistake in here :confused:
this program has no purpose except to teach me about classes (incase you're wondering :D)
CPlayer Class
// Player.cpp: implementation of the CPlayer class.
//
//////////////////////////////////////////////////////////////////////
#include "iostream.h"
#include "Player.h"
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CPlayer::CPlayer()
{
}
CPlayer::~CPlayer()
{
}
void CPlayer::jump()
{
cout << "Player jumped!";
}
Now here is the main part of my code.
#include <iostream>
using namespace std;
void main()
{
CPlayer guy;
guy.jump(); // The guy suppose to JUMP here but he doesn't!!!
}
for some reason this ain't working so could someone spot a mistake in here :confused: