Skip to content
Snippets Groups Projects
Commit b29eb3e1 authored by Monoki Dorina's avatar Monoki Dorina
Browse files

fajlbeolvasason dolgozom

parent 22e60b5b
No related branches found
No related tags found
No related merge requests found
985601000006540021000030000807904100530007986190800000003070600020085300708306000
\ No newline at end of file
......@@ -5,7 +5,7 @@ using namespace std;
GameMaster::GameMaster(std::string mo, std::string fe) :
_fajl_megoldas(mo), _fajl_feladat(fe)
{
_megoldas = fajl_beolvasas(_fajl_megoldas);
// _megoldas = fajl_beolvasas(_fajl_megoldas);
_feladat = fajl_beolvasas(_fajl_feladat);
_save = _feladat;
_fajl_save = "save.txt";
......@@ -61,16 +61,18 @@ bool GameMaster::szabalyos_e(Index jelenlegi)
std::vector<std::vector<int>> GameMaster::fajl_beolvasas(std::string fajlnev)
{
std::ifstream fajl(fajlnev);
std::ifstream fajl;
fajl.open(fajlnev);
std::vector<std::vector<int>> teljes;
for (int i=0; i<9; i++)
{
int szam;
std::vector<int> sor;
for (int j=0; i<9; i++)
for (int j=0; j<9; j++)
{
int szam;
fajl >> szam;
cout << szam << endl;
sor.push_back(szam);
}
fajl >> ws;
......@@ -87,7 +89,8 @@ void GameMaster::save()
void GameMaster::fajl_kiiras(std::string fajlnev,std::vector<std::vector<int>> v) const
{
std::ofstream fajl(fajlnev);
std::ofstream fajl;
fajl.open(fajlnev);
for (vector<int> sor : v)
{
......
......@@ -4,6 +4,7 @@
#include "application.hpp"
#include <vector>
#include <fstream>
#include <iostream> // for debug
class GameMaster
{
......
985621473376549821241738569867954132534217986192863754453172698629485317718396245
\ No newline at end of file
214748364721474836472147483647214748364721474836472147483647214748364721474836472147483647
214748364721474836472147483647214748364721474836472147483647214748364721474836472147483647
214748364721474836472147483647214748364721474836472147483647214748364721474836472147483647
214748364721474836472147483647214748364721474836472147483647214748364721474836472147483647
214748364721474836472147483647214748364721474836472147483647214748364721474836472147483647
214748364721474836472147483647214748364721474836472147483647214748364721474836472147483647
214748364721474836472147483647214748364721474836472147483647214748364721474836472147483647
214748364721474836472147483647214748364721474836472147483647214748364721474836472147483647
214748364721474836472147483647214748364721474836472147483647214748364721474836472147483647
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment