Help with error

problem: smart keypad;
code: https://ide.codingblocks.com/s/461327

How do I store all the possible combinations in a vector?

the code is working correctly if I don’t store and just print

hello @raghav007
ur out is empty string ,u cant use indexing over it.

use push vack to push character at its back

it is not able to correctly handle inputs with 0 and 1

remove the if statement and let ur for loop handel it

thanks it is working now

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.