You guys were so great with answering my first question that I've decided to
ask you yet again! Again, only the relevant code is included.
typedef unsigned int unint;
#include <iostream>
class Creature
{
public:
unint ReturnSpellPoin ts() {return crSpellPoints;}
void SetSpellPoints( int points) {crSpellPoints = points;}
private:
unint crSpellPoints;
};
int main()
{
Creature *Play1 = new Creature;
Play1->SetSpellPoints (10);
if (Play1->ReturnSpellPoi nts > 0) //Line 17
std::cout << "Select an action:\n";
return 0;
}
--
C:\...filename( 17) : error C2296: '>' : illegal, left operand has type
'unsigned int (__thiscall Creature::*)(vo id)'
--
What's wrong with the operand? And what's __thiscall?
Thanks,
Tim M.
ask you yet again! Again, only the relevant code is included.
typedef unsigned int unint;
#include <iostream>
class Creature
{
public:
unint ReturnSpellPoin ts() {return crSpellPoints;}
void SetSpellPoints( int points) {crSpellPoints = points;}
private:
unint crSpellPoints;
};
int main()
{
Creature *Play1 = new Creature;
Play1->SetSpellPoints (10);
if (Play1->ReturnSpellPoi nts > 0) //Line 17
std::cout << "Select an action:\n";
return 0;
}
--
C:\...filename( 17) : error C2296: '>' : illegal, left operand has type
'unsigned int (__thiscall Creature::*)(vo id)'
--
What's wrong with the operand? And what's __thiscall?
Thanks,
Tim M.
Comment