This one class I have has only protected
variable attributes like int health
and int level
, but no methods. Is this bad practice? I am using this for a save game function and it only needs to use variables, but requires no methods. The files look like this:
Human.h:
// Human.h - Johnny P
#pragma once
namespace SharpEngine {
class Human {
protected:
std::string name;
int level;
int health;
int defense;
int strength;
int experience;
int money;
int inventory[10];
};
}
Human.cpp
// Human.cpp - Johnny P
#include <string>
#include "Human.h"