Reanimation
Reanimation

Reputation: 3336

Console Output - Random Number Appearing

I'm using OpenGL/Glut/GLM to import and render a model to my screen.

When I'm outputting to the console when the model is loaded or a key is pressed, a number follows the output... I've noticed it a few times now...

The format I use is: std::cout << "\nW key pressed\n" << std::cout; etc...

I hope this isn't a stupid question, but what is that number? And why is it appearing? Can I stop it?

console

Upvotes: 0

Views: 274

Answers (1)

shf301
shf301

Reputation: 31394

That's the address of std::cout. It's showing up being you are inserting std::cout into std::cout.

Get rid of the std::cout at the end of your statement:

std::cout << "\nW key pressed\n";

Upvotes: 1

Related Questions