Переменная question
.cpp file
#include "Test.h"
#include <fstream>
void Test::Start()
{
std::fstream stream("Test.txt", std::fstream::in);
std::string fileValue;
while (!stream.eof())
{
std::getline(stream, fileValue);
if (fileValue != "")
{
question += fileValue;
question += "\n";
}
else
{
question.clear();
}
}
stream.close();
}
.h file
#pragma once
#include <string>
#include <vector>
class Test
{
static std::string question;
static std::vector<int> answers;
static void Show();
public:
static void Start();
};