I've put all my classes above main.
CODE
...
class weapon
{
public:
char name[100];
int patk;
int pacc;
int matk;
bool use[numType];
};
int main()
{
...
Like that. Now I want to read in a variable from a file that contains a variable called numWeapons. After that I want to declare "example" as type class.
To declare this, I would use something like the following:
CODE
weapon example[numWeapons];
The problem is, I need example to be global.
Since I've read in a variable, I can't declare example outside of any functions can I?