I get an error message that some kind of structure is needed to the left of the period in
Code:
//.h file
class Human
{
public:
Human(int HumanX=30) {}
~Human() { cout<<"A human ceases to exist."; }
int range(HumanX) {return HumanX;};
};
void rooms(int room)
{
if (room==1)
{
Human *Joe = new Human();
cout<<Joe.range();
}
}
Code:
//main file
#include <iomanip>
#include <iostream>
#include <fstream>
#include <stdlib.h>
#include <conio>
#include <time>
#include <ctype>
#include <rooms>
int end_game=0;
int room=1;
int main ()
{
time_t seconds;
time(&seconds);
srand((unsigned int) seconds);
textcolor(LIGHTCYAN);
do
{
rooms(room);
}
while(end_game!=1);
getch();
return 0;
}