+ 5
[SOLVED]Why dose this give different pointer values?
in my C + + course I was learning about pointers. in this code when the person in the video runs the code, he gets the value 0x7fff5fbff808. but on my computer, i get the value 012FFCD4. and on sololearn i get a different value. is it because there ran on different compilers? https://code.sololearn.com/cXVSWyw0ZHPd/?ref=app
2 Réponses
+ 12
That's the actual memory address the value is stored in at runtime. Even if you run the program 20 times on your PC, you'll most likely get 20 different outputs
+ 1
there is one very minor problem also....you have initiated value of data member of class in the definition of class.....which give a sumentic error