int size = busNodes.size(); double * distancearray=new double[size]; for(int value = 0;value<busNodes.size();value++) { distancearray[value]=Infinity; } During the first launch of the program, the number of bus stops is 234, but then I want to change and see how the program considers everything.
The problem is only in one, when creating an array, it does not create 234 stops with an infinity distance, but creates only one.
What am I doing wrong? And there were already many topics on this topic, only doing everything as described in those topics and not only here, I still get one stop.
value, and some unknowni. - αλεχολυτbusNodes.size() == 10, then this indicator is reset and becomes 1 (I don’t know how, but this seems to be) the question: why not use the ready-made variablesizein the loop? output to output whatsizeandbusNodes.size()are equal to - Senior Pomidor