I have a program that tells me there are errors when compiling but does not list any errors.
Any idea what this means?
Delete the .opts files in the folder. The files must have been moved or reorganized. Happens to me all the time.
Did that - same error - compiler says there are errors but does not list anything.
Project or single compile?
Check your resources too.
Just a single compile - that is what is strange.
I am going to start commenting out code to see if I can find what it is.
Found the offending code:
struct squadron {
int row, col;
int course;
int type;
int from;
squadron s_next;
squadron previous;
int planes;
int fuel;
int attack;
}
squadron federation;
No idea what is wrong with this.
The two lines
squadron s_next;
squadron previous;
Should be:
squadron *s_next;
squadron *previous;
If your attempting to make your own list. Better to use the linked list functions for that anyway. As for why it's just exiting instead of giving you and error message I'll find out and fix it.
Basically if you embed a structure within itself it ends up in an endless loop trying to calculate the infinate size of the structure. Think about it for a moment. The member s_next contains the member s_next wich contains the member s_next and so on.
Paul.
You are right they should have been pointers - my bad.