diff options
| author | dawidg81 <dawidgorski.m@gmail.com> | 2026-01-28 20:13:39 +0100 |
|---|---|---|
| committer | dawidg81 <dawidgorski.m@gmail.com> | 2026-01-28 20:13:39 +0100 |
| commit | b6bc0d092fe2ab07c6aa1406781a13838714cdf2 (patch) | |
| tree | 74ee021008d28ffcae2026cf0a31fce1ec57207e /src | |
| parent | b80b1fbc4da147911099a27a8ad3d677a122ee21 (diff) | |
several fixes and successfull build
Diffstat (limited to 'src')
| -rw-r--r-- | src/Game.cpp | 6 | ||||
| -rw-r--r-- | src/Utils.cpp | 2 | ||||
| -rw-r--r-- | src/main.cpp | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/Game.cpp b/src/Game.cpp index f869f51..be922c5 100644 --- a/src/Game.cpp +++ b/src/Game.cpp @@ -49,14 +49,14 @@ int Game::editDiff(){ std::cout << "Now editing custom difficulty" << std::endl; std::cout << "Board width: "; - if(util.catchReturn(util.catchInputInt(Game::boardWidth)) != 0) return 1; + if(util.catchReturn(util.catchInputInt(&boardWidth)) != 0) return 1; std::cout << Game::boardWidth; std::cout << "Board height: "; - if(util.catchReturn(util.catchInputInt(Game::boardHeight)) != 0) return 1; + if(util.catchReturn(util.catchInputInt(&boardHeight)) != 0) return 1; std::cout << "Mines: "; - if(util.catchReturn(util.catchInputInt(Game::mines)) != 0) return 1; + if(util.catchReturn(util.catchInputInt(&mines)) != 0) return 1; return 0; } diff --git a/src/Utils.cpp b/src/Utils.cpp index 37ebefe..b32b4e8 100644 --- a/src/Utils.cpp +++ b/src/Utils.cpp @@ -4,7 +4,7 @@ #include <ostream> int Utils::catchInputInt(int* input){ - std::cin >> input; + std::cin >> *input; if (std::cin.fail()) { std::cout << "error: Input failed" << std::endl; diff --git a/src/main.cpp b/src/main.cpp index 3e1c1cc..88b8ffa 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,5 +1,5 @@ #include <iostream> -#include "Game/Game.hpp" +#include "Game.hpp" using namespace std; int main(){ |
