• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Why do I get this???

1student

Member
Hi,
I wrote a program in C++, and got somthing strange:
Enter a number 1
0x1a271046Enter a number 2
0x1a271046Enter a number +
0x1a271046Enter a number
The exercise you entered is: 1 2 +

enclosed is the program.

 
🙂

You were outputting the address of the cout object everytime you ran "cout<<cout<<"Enter a number ";"

When you see hex numbers in your output where they aren't supposed to be, it usually means you output a memory address accidently.
 
Back
Top