May 01, 2024, 12:13:51 AM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Structure question

Started by Rock Ridge Farm (Larry), August 07, 2006, 10:30:58 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Rock Ridge Farm (Larry)

The following is valid on Linux:
struct torpedo {
   int row, col;
   int course;
   int fromship;
   int timeleft;
   struct torpedo *next_torp;
}

It is not in Aurora. - It does not like the pointer reference to a structure of the same type within the structure.
Help!


Ionic Wind Support Team

Just remove the 'struct' keyword.

struct torpedo {
   int row, col;
   int course;
   int fromship;
   int timeleft;
   torpedo *next_torp;
}

Compiler already knows it's a structure.
Ionic Wind Support Team