You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

34 lines
533 B

#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;
}
}