Orchid XP v8 wrote:
> Spot the mistake:
>
> int foo(vector<int>& stack)
> {
> int x = stack.back();
> stack.pop_back();
> }
>
> For reasons I can't begin to understand,
>
> 1. This doesn't produce any compile-time error.
>
> 2. This function always returns the value "2144912088".
Function lacks a return statement.
--
Inoculatte: To take coffee intravenously when you are running late.
/\ /\ /\ /
/ \/ \ u e e n / \/ a w a z
>>>>>>mue### [at] nawazorg<<<<<<
anl
Post a reply to this message
|