#include
#include
class HelloWorld {
public:
std::string x;
private:
int switcher = 1;
public:
void helloWorldFunction() {
if (switcher > 0) {
std::cout << (x.empty() ? "Null value" : x) << std::endl;
} else {
text_out("you don't have permission");
}
}
};
void displayHelloWorld(HelloWorld& hw, const std::string& message) {
hw.x = message;
hw.helloWorldFunction();
}
int main() {
HelloWorld helloWorld;
static int chooseNumber = 2;
if (chooseNumber == 2) {
displayHelloWorld(helloWorld, "Hello World!");
HelloWorld helloWorld2;
displayHelloWorld(helloWorld2, "Hello Planet!");
}
std::cin.get();
return 0;
}