470,850 Members | 1,298 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,850 developers. It's quick & easy.

Can I declare a static array in a structure


can somebody suggest any alternative of the code below?
I want the values in the array to be flexible as much as I can.

typedef struct
static char* SomethingToStore[]={
(ByteType*)"sometext here",
(ByteType*)"sometext here",
(ByteType*)"sometext here",
(ByteType*)"sometext here",
(ByteType*)"sometext here"

static char* AnotherSomethingToStore[]={
(ByteType*)"sometext here",
(ByteType*)"sometext here",
(ByteType*)"sometext here",
(ByteType*)"sometext here",
(ByteType*)"sometext here"

} endOfStruct;

I can make this work if I will declare this outside a structure or as a global variable.

Thanks for the help.
Aug 30 '06 #1
1 3206
9,065 Expert Mod 8TB
Why would you want to declare a static array in a structure, I can think of no situation where this would be useful.
Aug 30 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Richard A. Lowe | last post: by
8 posts views Thread by redefined.horizons | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.