combining ints in C++

Associate
Joined
3 Jun 2007
Posts
23
Hey guys

Just experimenting with C++ for university at the moment and have come across a simple task that I would like to do without finding a solution on the web or text books.

Would like to combine two int's into a single int variable like so:

int a = 244
int b = 201

int c = 244201

Is it even possible?

Thanks for any guidance.
 
Thanks for the extra suggestion dave :)

Edit: Got it all working now :). Aim was to create a RGB number from three separate randomly generated numbers from 0 - 255 to create random colours.
 
Last edited:
Back
Top Bottom