The error is:
In function ‘int returnShortestWeightedBranch(std::vector >*)’: error: name lookup of ‘jj’ changed for
for (int jj = 0; jj < routeVector[i].selectedBranchesVector.size(); jj++);
This line ends with a semicolon! It shouldn't :)