struct foo
{
int bar;
char baz;
};
int some_function(struct foo *f)
{
f->bar = 1;
f->baz = 'x';
}
int int_array[10];
struct foo foo_array[10];
extern const int int_array[];
extern const struct foo foo_array[];
typedef struct foo;
typedef struct size_type;
typedef struct weapon_rate_type;
extern const struct weapon_rate_type weapon_rating[WEAPON_MAX];
/* forward declaration of struct weapon_rate_type */
struct weapon_rate_type;
/* Now you can manipulate pointers (only) to the incomplete struct weapon_rate_type. */
/* forward declaration of struct weapon_rate_type that has an alias */
typedef struct weapon_rate_type foobar;
/* Now you can write "foobar" wherever (except for the definition itself) you could write "struct weapon_rate_type" */
/* Complete the definition of struct weapon_rate_type */
struct weapon_rate_type
{
int foo;
int bar;
};
/* Now you can use struct weapon_rate_type anywhere */
Well I came here for a bit of help. I have been in the process of making a project off and on for about 4 years now. I finally got it ready and was about to put it on a server and see if I could staff it and get a player base going. It compiled and ran in windows with cygwin however when I tried it on an updated system it didnt want to go. So I am hoping you all can help me get the code up to par with the most current definitions and stuff. The first error I come across is
This is one of the 200 or so lines of code that it rejects under that premise:
I know that the array is size_table[] and the compiler is telling me that the error is there, however a similar line of code that works is this:
The diference is the "int" where the "struct" is. I also have lines that work with "char*" in that spot. This makes me think that the error is actually with the "struct" keyword. If anyone can let me know what my problems are and why it would be greatly appreciated.