I want to get my row no. and col no. in stairCase search problem,How should I return both from a function.
How to return two variables from a functio
hello @yashratnani6
there are various ways.
a) u can return pair (store both values in pair and return that pair)
b) u can return vector (store both values in vector and return that vetcor)
c) dynamically allocate array of size 2 , put ur values in that array and then return base address.
there may exist some more method right now it is not coming to my mind
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.