# Problems with conversión

199

Good morning, I have a little problem, and I need help ...
I have two variables
int a = 09;
int b = 05;

I need to concatenate these two variables for what do I convert a string and concatenation, the result is

95 (I lose the leading 0)

then turn back to Integer and I need to make a comparison, but of course the result is bad because I need the 0 for the comparison is correct, how I can do to keep these leading 0?.

Thank you.
16058

1. There are no leading zeros in ints. There's no need to keep it. There's no need to concatenate for comparison. Define what you mean by your comparison. What are you trying to do?

2.  ```int a = 09; int b = 05;``` ```int a = 9; int b = 5;```
In mt4 these are EXACTLY the same. There is NO difference. (in C/C++ the leading zero means octal conversion, 05==5, 09 doesn't compile, and 011==8+1==9)
Moderator
18035

jugivi:
Good morning, I have a little problem, and I need help ...
I have two variables
int a = 09;
int b = 05;

I need to concatenate these two variables for what do I convert a string and concatenation, the result is

95 (I lose the leading 0)

then turn back to Integer and I need to make a comparison, but of course the result is bad because I need the 0 for the comparison is correct, how I can do to keep these leading 0?.

Thank you.

Just think a little, it's very simple . . .

```int a = 09;
int b = 05;

if( a < 10 ) LeadingZero_a = "0";
if( b < 10 ) LeadingZero_b = "0";

```string   RJust(string s, int size, string fill=" "){