user1501445
user1501445

Reputation: 95

Visual studio not executing code correctly

Yeah so ive tried lots of stuff but the output keeps coming out all messed up. Heres a picture showing whats going on. As you see the letter variable gets all weird.

http://img249.imageshack.us/img249/8775/weirdvisstud.png

Upvotes: 0

Views: 87

Answers (1)

Ylisar
Ylisar

Reputation: 4293

The problem is that "letter: " + letter" doesn't do what you think it does, it adds the integral value of letter to the const char* string literal "letter". Easiest fix is string("letter: ") + letter.

Upvotes: 3

Related Questions