S
Stainless
I have a public class Globals, which obviously holds all my global data.
I have an array of 243 items, currently structs of type
typedef struct STAR
{
int x;
int y;
int stellar_class;
}t_star;
t_star StarArray[243]={
{.....},
};
If I was doing this app in C I would just have the array as a seperate
C source file, compile it in, and have extern t_star StarArray[] where
ever I needed it.
What's the correct way to do this in cpp?
having global data is frowned upon, you can't put it in the class
header as this is against ansi conventions....
Are you supposed to define the empty array in the class header then
fill it in the class creation tool? What a waste of stack space....
puzzled...
--
I have an array of 243 items, currently structs of type
typedef struct STAR
{
int x;
int y;
int stellar_class;
}t_star;
t_star StarArray[243]={
{.....},
};
If I was doing this app in C I would just have the array as a seperate
C source file, compile it in, and have extern t_star StarArray[] where
ever I needed it.
What's the correct way to do this in cpp?
having global data is frowned upon, you can't put it in the class
header as this is against ansi conventions....
Are you supposed to define the empty array in the class header then
fill it in the class creation tool? What a waste of stack space....
puzzled...
--