I know this is using C. But if i was using the stdlib.h to use C in C++, can i somehow save the output into a variable. That way i can save the value for later use.
something like...
int a = 15;
int b = 7;
int hexValue = printf ( "%x\n", a + b );


But something that works.
I'm just trying to find a simple way to add two hex numbers together but in C++;
Thanks

I know this is using C. But if i was using the stdlib.h to use C in C++ ..... trying to find a simple way to add two hex numbers together but in C++;

I know this is the C forum, but if it were the C++ forum, it would be a different forum.

I also know this thread is 1-1/2 years old, but if it were a new thread, it would be a different thread.

I know this is the C forum, but if it were the C++ forum, it would be a different forum.

I also know this thread is 1-1/2 years old, but if it were a new thread, it would be a different thread.

I know that you're not a mod, but if you were a mod you'd probably move this thread.

I also know that I am a mod and split this thread and moved it to the C++ forum.

:)

commented: ;) +5
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.