I want some help with my Triple X Game Code!

When I ran the following code:

#include <iostream>

int main()

{

    std::cout << "Welcome To TripleX";

    std::cout << std::endl;

    std::cout << "You are a detective breaking into the secret sever rooms of a notorious cyberthief";

    std::cout << std::endl;

    std::cout << "You need to enter the correct password to continue...";

   int a = 4;

std::cout << a;

return 0;

}

The variable was not printed. What is the reason for this error?

1 Like

Your code is fine.
here’s the output - could it be that you meant to have a newline before printing a and it’s on the end of the last line of text?

Resolved on Discord. They didn’t compile with the file extension so the compiler assumed .obj which was the previously compiled object file.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.