|
|
|
2 registered members (TipmyPip, 1 invisible),
1,395
guests, and 3
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: possible to make array of STRING* ?
[Re: Lukas]
#334373
07/22/10 18:35
07/22/10 18:35
|
Joined: Feb 2008
Posts: 3,232 Australia
EvilSOB
Expert
|
Expert
Joined: Feb 2008
Posts: 3,232
Australia
|
And the "Array_video[?] = ..." lines need to be in a function. eg
STRING* Array_video[6];
void VideoArray_fill_startup()
{
//this function will auto-execute at startup
Array_video[0] = str_create("VIDEO");
Array_video[1] = str_create("GAMMA");
Array_video[2] = str_create("SCREEN");
Array_video[3] = str_create("GAMMA");
Array_video[4] = str_create("ALPHA");
Array_video[5] = str_create("DEPTH");
}
"There is no fate but what WE make." - CEO Cyberdyne Systems Corp. A8.30.5 Commercial
|
|
|
Re: possible to make array of STRING* ?
[Re: djfeeler]
#334385
07/22/10 20:13
07/22/10 20:13
|
Joined: Mar 2008
Posts: 2,247 Baden Württemberg, Germany
Espér
Expert
|
Expert
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
|
possible is this ,too
TEXT* stringarray = {
string = ("String 1", "String 2", "String 3" ...etc..etc);
}
and readout/write with
str_cpy((stringarray.pstring)[index_number] , "something");
if(str_cmpi((stringarray.pstring)[index_number], "something"))
{
}
where "index_number" is the number of the string, starting at 0
|
|
|
|
|
|
|