Why does typeid.name() return 'random' characters? šŸ˜• | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 8

Why does typeid.name() return 'random' characters? šŸ˜•

I tried using it in this code šŸ‘‡ https://code.sololearn.com/c29mUiJEjNFz/?ref=app It only does that on gcc, but works fine on Visual Studio.

28th Aug 2019, 8:50 AM
Moses Odhiambo
Moses Odhiambo - avatar
4 Respostas
+ 8
Sonic I've tried to initialize them - doesn't change anything
28th Aug 2019, 1:57 PM
Moses Odhiambo
Moses Odhiambo - avatar
+ 2
I think it's because the letter variable is not initialised and therefore contains garbage/random values.
28th Aug 2019, 1:05 PM
Sonic
Sonic - avatar
+ 1
~ swim ~ nice enlightening explanation
28th Aug 2019, 3:53 PM
Logomonic Learning
Logomonic Learning - avatar