array index out of bounds
#3

Quote:
Originally Posted by DRIFT_HUNTER
Посмотреть сообщение
Apart from seeing that you check files for existing house (that's stupid) i can see that you will always return valid id ( new id = (1); )

Also you start counting houses from 1, while they should start from 0. Every array start from 0.

Код:
for(new loop = (0), provjera = (1), Data_[64] = "\0"; loop < len; ++ loop)
That loop var probably has to be less then len variable, since you start from loop from 0. Also you should return some invalid id like -1 and check in command if returned id is actually invalid (not file).
http://prntscr.com/ejyzvv :@ didn't work
Reply


Messages In This Thread
array index out of bounds - by FilipRonaldo - 14.03.2017, 17:34
Re: array index out of bounds - by DRIFT_HUNTER - 14.03.2017, 19:13
Re: array index out of bounds - by FilipRonaldo - 14.03.2017, 19:57
Re: array index out of bounds - by DRIFT_HUNTER - 14.03.2017, 20:58
Re: array index out of bounds - by FilipRonaldo - 14.03.2017, 21:14
Re: array index out of bounds - by DRIFT_HUNTER - 15.03.2017, 05:51

Forum Jump:


Users browsing this thread: 2 Guest(s)