From 2f296f674650154ce0066a72ff68e063ad4d1339 Mon Sep 17 00:00:00 2001 From: pikalovvova1303 Date: Thu, 18 Jul 2024 20:33:43 +0300 Subject: [PATCH] 3.0 final build --- DataBase/DataBase.vcxproj | 1 + DataBase/DataBase.vcxproj.filters | 3 ++ DataBase/Page/1151.txt | 1 - DataBase/Page/13021un.txt | 1 - DataBase/Page/26739_un.txt | 1 - DataBase/Page/31503_un.txt | 0 DataBase/Page/3376_un.txt | 0 DataBase/Page/3438_un.txt | 1 - DataBase/Source.cpp | 9 ++---- DataBase/defs.h | 11 ------- DataBase/includes.h | 1 + DataBase/parcer.h | 50 +++++++++++++++++++++++++++++++ 12 files changed, 57 insertions(+), 22 deletions(-) delete mode 100644 DataBase/Page/1151.txt delete mode 100644 DataBase/Page/13021un.txt delete mode 100644 DataBase/Page/26739_un.txt delete mode 100644 DataBase/Page/31503_un.txt delete mode 100644 DataBase/Page/3376_un.txt delete mode 100644 DataBase/Page/3438_un.txt create mode 100644 DataBase/parcer.h diff --git a/DataBase/DataBase.vcxproj b/DataBase/DataBase.vcxproj index 0649934..58389f4 100644 --- a/DataBase/DataBase.vcxproj +++ b/DataBase/DataBase.vcxproj @@ -135,6 +135,7 @@ + diff --git a/DataBase/DataBase.vcxproj.filters b/DataBase/DataBase.vcxproj.filters index 23a2851..b9946ff 100644 --- a/DataBase/DataBase.vcxproj.filters +++ b/DataBase/DataBase.vcxproj.filters @@ -29,5 +29,8 @@ Frameworks + + Frameworks + \ No newline at end of file diff --git a/DataBase/Page/1151.txt b/DataBase/Page/1151.txt deleted file mode 100644 index 95d09f2..0000000 --- a/DataBase/Page/1151.txt +++ /dev/null @@ -1 +0,0 @@ -hello world \ No newline at end of file diff --git a/DataBase/Page/13021un.txt b/DataBase/Page/13021un.txt deleted file mode 100644 index 95d09f2..0000000 --- a/DataBase/Page/13021un.txt +++ /dev/null @@ -1 +0,0 @@ -hello world \ No newline at end of file diff --git a/DataBase/Page/26739_un.txt b/DataBase/Page/26739_un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/31503_un.txt deleted file mode 100644 index e69de29..0000000 diff --git a/DataBase/Page/3376_un.txt b/DataBase/Page/3376_un.txt deleted file mode 100644 index e69de29..0000000 diff --git a/DataBase/Page/3438_un.txt b/DataBase/Page/3438_un.txt deleted file mode 100644 index a427aba..0000000 --- a/DataBase/Page/3438_un.txt +++ /dev/null @@ -1 +0,0 @@ -hh \ No newline at end of file diff --git a/DataBase/Source.cpp b/DataBase/Source.cpp index 0bd8ff1..c6a3dbe 100644 --- a/DataBase/Source.cpp +++ b/DataBase/Source.cpp @@ -228,6 +228,7 @@ int main() { else if (SlineRd.Command == ComArray[1]) { // algorithm to find a symbols in file ioClass insideFind; TextWork TextInsideFind; + Parcer ParceSpec; string nameFileF = "Page/"; string nameFileS; @@ -243,20 +244,14 @@ int main() { if (fileToRead.is_open()) { TextInsideFind.Text; - long count = 0; cout << endl << "file is open" << endl; for (int i = 0; i <= 1999; i++) { fileToRead.get(TextInsideFind.SymArr[i]); } + ParceSpec.ParseFile(TextInsideFind.SymArr); - - cout << endl << endl << endl; - cout << "Numbers of special symbols inside your file is -> " << count; - cout << endl << endl << endl; - - fileToRead.close(); } else { diff --git a/DataBase/defs.h b/DataBase/defs.h index da3aea9..03c3472 100644 --- a/DataBase/defs.h +++ b/DataBase/defs.h @@ -25,14 +25,3 @@ void Get_Exit() {// function to abort programm exit(0); } -int ParseFile(char arrSym[2000]) { - - bool operation_stop = false; - - - - - if (operation_stop) { - return 0; - } -} diff --git a/DataBase/includes.h b/DataBase/includes.h index 3612005..f99dc52 100644 --- a/DataBase/includes.h +++ b/DataBase/includes.h @@ -13,6 +13,7 @@ #include "defs.h" #include "name_gen.h" +#include "parcer.h" #include // windows depended lobrary #include // windows depended library \ No newline at end of file diff --git a/DataBase/parcer.h b/DataBase/parcer.h new file mode 100644 index 0000000..0f8296a --- /dev/null +++ b/DataBase/parcer.h @@ -0,0 +1,50 @@ +#pragma once + +#include "includes.h" + +class Parcer { + +public: + + const char arrSymbolsSpec[5] = { '#', '@', '&', '-', '>' }; + + int ParseFile(char arrSym[2000]) { + + bool operation_stop = false; + + + if (true) { + + for (int i = 0; i <= 1999; i++) { + + if (arrSym[i] == arrSymbolsSpec[0] or arrSym[i] == arrSymbolsSpec[1] or arrSym[i] == arrSymbolsSpec[2] or arrSym[i] == arrSymbolsSpec[3] or arrSym[i] == arrSymbolsSpec[4]) { + + cout << endl << arrSym[i - 10] << arrSym[ i - 9] << arrSym[i - 8] << arrSym[i - 7] << arrSym[i - 6] << arrSym [i - 5] << arrSym[i - 4] << arrSym[i - 3] << arrSym[i - 2] << arrSym[i - 1] << arrSym[i] << endl; + + } + } + } + + return 0; + + } + +private: + + bool _findSymTxt(char arrSym[2000]) { + + for (int i = 0; i <= 1999; i++) { + + if (arrSym[i] == arrSymbolsSpec[i]) { + return true; + } + + else { + return false; + } + + } + + } + +};