So I tried starting from scratch without going through the videos just to rebuild a cleaner foundation in hopes of making it easier to troubleshoot, but somehow I get a whole a different output for the product hint every time…
//Basic functions such as cout/cin
#include <iostream>
const std::string Intro = "\n\n Welcome to my game!\n Crack the 3 digit code on each level to move on!\n";
const std::string SumHint = "\n The Numbers Add Up To: ";
const std::string ProductHint = "\n The Numbers Multiply Out To: ";
const std::string InputCode = "\n\n Input Code: ";
bool PlayGame()
{
int Level;
int CodeA = 1;
int CodeB = 2;
int CodeC = 3;
int CodeSum = CodeA+CodeB+CodeC;
int CodeProduct = CodeA*CodeB*CodeC;
int CodeInputA;
int CodeInputB;
int CodeInputC;
int InputSum;
int InputCode;
std::cout << Intro;
std::cout << SumHint << CodeSum << ProductHint << CodeProduct << InputCode;
std::cin >> CodeInputA >> CodeInputB >> CodeInputC;
return false;
}
int main()
{
bool bLevelComplete = true;
while(bLevelComplete)
{
bLevelComplete=PlayGame();
}
return 0;
}