Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
0 registered members (), 17,758 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Using TEXT* as string arrays? #249900
02/04/09 19:35
02/04/09 19:35
Joined: Jul 2005
Posts: 192
Orange County
S
silencer Offline OP
Member
silencer  Offline OP
Member
S

Joined: Jul 2005
Posts: 192
Orange County
Does the following still work in C-Lite? If not, what is the new syntax?

Code:
TEXT* willkommen
{
...
strings = 5; // 5 differenet string pointes
string = willkommen, dies_ist, ein, text,string1;
}

...

my_text.string[3] = new_string;



AMD 64 x2 4400+ 2048mb DDR3200 NVidia 6800GS 256mb Soundblaster Audigy 2 A7 Commercial 7.07
Re: Using TEXT* as string arrays? [Re: silencer] #249902
02/04/09 19:36
02/04/09 19:36
Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
str_cpy((my_text.pstring)[3],new_string);


3333333333
Re: Using TEXT* as string arrays? [Re: Quad] #249906
02/04/09 19:55
02/04/09 19:55
Joined: Jul 2005
Posts: 192
Orange County
S
silencer Offline OP
Member
silencer  Offline OP
Member
S

Joined: Jul 2005
Posts: 192
Orange County
Thanks friend!


AMD 64 x2 4400+ 2048mb DDR3200 NVidia 6800GS 256mb Soundblaster Audigy 2 A7 Commercial 7.07
Re: Using TEXT* as string arrays? [Re: silencer] #249915
02/04/09 20:30
02/04/09 20:30
Joined: Jul 2005
Posts: 192
Orange County
S
silencer Offline OP
Member
silencer  Offline OP
Member
S

Joined: Jul 2005
Posts: 192
Orange County
What if "new_string" is of type "string*" , will that be a problem since my_text.pstring is of type "string"?


AMD 64 x2 4400+ 2048mb DDR3200 NVidia 6800GS 256mb Soundblaster Audigy 2 A7 Commercial 7.07
Re: Using TEXT* as string arrays? [Re: silencer] #250031
02/05/09 16:20
02/05/09 16:20
Joined: Nov 2002
Posts: 913
Berlin, Germany
S
SchokoKeks Offline
User
SchokoKeks  Offline
User
S

Joined: Nov 2002
Posts: 913
Berlin, Germany
aren't there real string arrays now? working with pointers?
can anyone get me started on them? can't find info about them.

Re: Using TEXT* as string arrays? [Re: SchokoKeks] #250032
02/05/09 16:25
02/05/09 16:25
Joined: Jul 2008
Posts: 894
T
TechMuc Offline
User
TechMuc  Offline
User
T

Joined: Jul 2008
Posts: 894
the correct syntax for a string array

Code:
STRING** tst;
tst = malloc(sizeof(STRING*),number of elements);
for(int i=0;i<number of elements;i++)
tst[i]=str_create("#number of characters");

//now you can access the string array like this:

str_cpy(tst[0],"hallo");



Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1