Here is a Minimum Reproducible Example:
#include <iostream>
#include <string>
int main()
{
int givenInt;
float givenFloat;
double givenDouble ;
std::string givenString;
char givenChar;
std::cin >> givenInt;
std::cin >> givenFloat;
std::cin >> givenDouble;
std::cin >> givenString;
std::cin >> givenChar;
std::cout << givenInt << std::endl;
std::cout << givenFloat << std::endl;
std::cout << givenDouble << std::endl;
std::cout << givenString << std::endl;
std::cout << givenChar << std::endl;
std::cout << &givenInt << std::endl;
std::cout << &givenFloat << std::endl;
std::cout << &givenDouble << std::endl;
std::cout << &givenString << std::endl;
std::cout << &givenChar << std::endl;
std::cout << "End" << std::endl;
return 0;
}
My input is:
32
64.212
4.76545
Hey
Hey
The first five prints are:
32
64.212
4.76545
Hey
H
The last one is only a H
because givenChar
is a char
.
However, when I print the memory adresses, I get:
0x75337ffcdc
0x75337ffcd8
0x75337ffcd0
0x75337ffcb0
H└³⌂3u
End
What is this weird H└³⌂3u
?