For my SIC assembler written in C++ , I need a hexadecimal integer as the location counter. That is if LOCCTR=A and LOCCTR++ should store B in LOCCTR. Is there such an variable in C++? If so how do I make it Hexadecimal?? I know how to Initialize an int variable with Hex value , int var=0x0
But my question will it remain a hexadecimal integer after increment operation? If not, how to convert it to hex
Jump to Post
What you need to remember is that both decimal and hexadecimal are only representations of the integer value, which is actually a binary value. Thus, it is only when you go to display the value that it becomes either decimal or hexadecimal, and the same value can be displayed either …
All 3 Replies
We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.