From 5639153b7e66792670f9063fe0ebc9d20c508836 Mon Sep 17 00:00:00 2001 From: bbod Date: Mon, 30 Mar 2020 15:30:10 -0600 Subject: [PATCH] Auto Commit --- HW10/MakePermutationMatrix.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HW10/MakePermutationMatrix.cpp b/HW10/MakePermutationMatrix.cpp index 2b3eb31..c5f3961 100644 --- a/HW10/MakePermutationMatrix.cpp +++ b/HW10/MakePermutationMatrix.cpp @@ -36,7 +36,7 @@ std::vector MakePermutationMatrix::MakePermutation(std::vector sou } std::cout << std::endl; do { - double cost; + double cost = 0; //Add up the cost of the current permutation. for (int i = 1; i < myPerm.size(); i++) { cost += costMatrix[myPerm[i].GetName()][myPerm[i-1].GetName()];