#includeusing namespace failquest; int main() { // Define quest Quest myQuest("Save the Princess"); // Add objective Objective savePrincess("Save the Princess!"); myQuest.addObjective(savePrincess); return 0; }
#includeIn this example, we create an objective to save the princess and then report a failure, stating that the princess has been captured by a dragon. Package Library: FailQuest.using namespace failquest; int main() { Objective savePrincess("Save the Princess!"); // Report failure savePrincess.reportFailure("The princess was captured by the dragon!"); return 0; }