0
What is the error here?
I just wanted to see if a variable will be destroyed aftr a return statement https://code.sololearn.com/cv0lb9Ow72Xw/?ref=app
1 Réponse
+ 3
`return` is not a function, it is supposedly written as:
return <something>;
Instead of
<something> = return(<something-else>);
(Edit)
You can't see what happens to local members past the `return` statement or block-end bracket '}' they are surely have been destroyed. A possible exception *probably* be a dynamically allocated memory that is not passed on somewhere else, since this types of memory is not stored in the stack. But still, nothing gets executed past a return statement or block-end bracket '}'.
Hth, cmiiw