I don't think there is much context needed for this question, so I exclude the rest of the code that I think is irrelevant. I type the code below and yet the console prints: "ü vaqB A". So the console misprints only the "cout << "MyPtr: "" part. I don't understand why this happens.
#include <iostream>
using namespace std;
int main() {
char var = 'A';
char *MyPtr = &var;
cout << "MyPtr: " << MyPtr << endl;
}