14.11.2016, 17:39
Hello guys! I want to make something like this:
- I'm using sscanf for getting the string '0:0:0:2:0:0:1:0:0' for example from the database.
- I'm using something like objVar[ 0 ] will be 0, obsVar[ 3 ] will be 2 and so on.
- My question it's how can I update just the value of the fourth number from that string?
(The reason it's that i don't wanna use format for creating a string with 35 values "%d:%d:%d...%d" [35 times]).
- I'm using sscanf for getting the string '0:0:0:2:0:0:1:0:0' for example from the database.
- I'm using something like objVar[ 0 ] will be 0, obsVar[ 3 ] will be 2 and so on.
- My question it's how can I update just the value of the fourth number from that string?
(The reason it's that i don't wanna use format for creating a string with 35 values "%d:%d:%d...%d" [35 times]).