Basic C++ question

@Deeg
Before offering this advice:

If you need it back as in int, do:

char concatenated[ 20 ];
int newInt = int( sprintf( concatenated, "%d%d", a, b ) );

you might want to look at WHAT sprintf returns.

Return Value
On success, the total number of characters written is returned. This count does not include the additional null-character automatically appended at the end of the string.
On failure, a negative number is returned.

So, if a = 123, and b = 456, sprintf returns the integer value 6, which does not need to be converted to an int (which is what int() does). So, newInt would contain 6, which is nowhere near 123,456.