|
2 registered members (TipmyPip, AndrewAMD),
12,726
guests, and 5
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: concatenating strings and arrays
[Re: Doriel]
#172629
12/15/07 08:05
12/15/07 08:05
|
Joined: Jul 2006
Posts: 503 Australia
adoado

User
|

User
Joined: Jul 2006
Posts: 503
Australia
|
Quote:
I am assuming the array only holds a pointer to the game_time string instead of a copy of the actual string
Arrays I think only hold numbers (vars) and not strings directly, so it would be a pointer to a string that it would be holding.
Maybe try
p_time_of_action[currentPatient * p_num_of_actions[currentPatient]] = str_create(game_time);
I am not fully understanding the problem (thats my fault - I am a little sleepy ) - so I am not sure whether this is the right answer or not 
Somehow copy the contents of "game_time" into a new string and then use the new string so the array value is no longer pointing to game_time...
Thanks, Adoado
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|
|
|