0

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

Edited by joperalez: it cut off some of my post.

3
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by Nick Evan
1

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.

1

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.

:)

Edited by Nick Evan: n/a

Votes + Comments
;)
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.