I have an integer in a vector and I need to convert it from a single digit (1,2,3,...9) to a single digit with a 0 in front of it (01,02,03,...09). How would I do that?
Your statement compared vector[i] with 1, and then or'ed it with the values 2, 3, etc., each treated like a boolean. Since any value other than 0 treated like a bool is true, your statement evaluates to
I'm trying to get the "]" to all line up when they get printed. The vector has randomized int's from 1 to 15, so when they get printed the single digit and double digit int's make it so they don't line up vertically.
Never mind , it happens sometimes :)
And since you are newbie let me tell you that you could mark this question as solved so others who browse here knows that this question is solved .