#include "flag.hpp"
|
|
|
|
#include <fstream>
|
|
#include <iostream>
|
|
|
|
std::string Flag::flag = "";
|
|
|
|
bool Flag::Load()
|
|
{
|
|
std::ifstream file("flag.txt");
|
|
if (file.good())
|
|
{
|
|
file >> flag;
|
|
return true;
|
|
}
|
|
else
|
|
{
|
|
return false;
|
|
}
|
|
}
|
|
|
|
void Flag::Print()
|
|
{
|
|
if (Load())
|
|
{
|
|
std::cout << flag << std::endl;
|
|
}
|
|
else
|
|
{
|
|
std::cout << "Something went wrong on the server\n"
|
|
<< "Please contact the administrator...\n"
|
|
<< std::endl;
|
|
}
|
|
}
|