Guest
|
Const struct define string |
Posted: Thu Apr 23, 2009 3:21 am |
|
|
Hi
Is it possible to _not_ define the length of the string in the struct?
No length is defined, compiler find out.
Code: | const char s1[] = "1234";
const char s2[] = "4321";
|
Length must be defined, but is there a way to avoid it in a const struct?
Code: | struct _proginfo{
char s1[5];
char s2[5];
}const px={"1234","4321"};
|
Some hints:-) |
|