is it possible to add a character and not a number to a int? so something like x = 1 and a 1 would give me 11 and not 2.
is it possible to add a character and not a number to a int? so something like x = 1 and a 1 would give me 11 and not 2.
Yes:
Assuming Digit is in the range 0 - 9.Code:int AddDigitToNumber(int Number, int Digit) { return ((Number * 10) + Digit); }
MagosX.com
Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime.