From b694582a087b90971b5ba0af4ae81f6290ecc5ba Mon Sep 17 00:00:00 2001 From: Eraser <erayduezenli@googlemail.com> Date: Sat, 15 Apr 2023 17:51:43 +0200 Subject: [PATCH] Cross IDE Adjustments --- levenD.cpp | 5 ++--- main.cpp | 6 ++++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/levenD.cpp b/levenD.cpp index 47c0d8f..5dcf2cf 100644 --- a/levenD.cpp +++ b/levenD.cpp @@ -19,9 +19,8 @@ int levenD(const std::string &s, const std::string &t) { int m = t.length(); int cost = 0; - //Matrix to hold the levenshtein distance - int Matrix[n + 1][m + 1]; - + //Matrix to hold the levenshtein distance (longest string is 174) + int Matrix[175][175]; // Initialize the first row and column of the matrix,[0][0] is empty for (int i = 0; i <= n; i++) { Matrix[i][0] = i; diff --git a/main.cpp b/main.cpp index 9e77dd1..606b0ce 100644 --- a/main.cpp +++ b/main.cpp @@ -7,6 +7,12 @@ int main() { std::list<Cards> scrambledCards; std::list<std::string> referenceCardNames; + /* on VsCode use this instead + //Take scrambled cards and put them in a list + scrambledCards = getListOfCards("../../scrambled.txt"); + //take reference names and put them in a list + referenceCardNames = referenceNames("../../reference.txt"); + */ //Take scrambled cards and put them in a list scrambledCards = getListOfCards("../scrambled.txt"); -- GitLab