Hi all,
My cpp is rusty as all get out and I'm wondering why this doesn't seem to work. I've basically created a .cpp file with all of the structs and lower level data types in it. One of these is an enumerated type. The file. structs.cpp is as follows:
#include <cstdlib>
using namespace std;
struct pos
{
int x;
int y;
pos(int i, int j)
{
x = i;
y = j;
}
};
enum Resources {wood, stone, metal, crops, animals, none};
My compiler is Dev-C++ v4.9.9.2 for windows. Other files that include structs.cpp can see the pos struct (or any other struct for that matter) but nobody can see the enumerated type. The same applies if I place it in my main.cpp before
int main(int argc, char *argv[])
Since the pos struct is visible, why isn't the enum? anyone? (I can workaround to just create a struct to contain the enumerated data and assign name value pairs but - I am curious as to why enums don't work. Thanks!