Message from C, C++ talks

October 2020

— That some fucking mood u r

— What fuking mood

— 😂😂😂

— So ask it

— 

Sry sry I didn't see it someone had send a msg that his mood was damn fucking and I replied u instead of someone else

— Facing problem with compiler

— Dude.
Ask the question.
With DETAIL.
Not 5 messages, 1 consise message, ok?

— Good day.

I have the following problem I hope you can help me:

Inside a function (fun_a) I am creating a lamda function to use as a callback when calling another function (fun_b).
Inside the lambda function I use a variable defined in the fun_a function.
After calling the fun_b function there is a waiting time, however if this time passes the fun_a function ends.
If after the function fun_a ends the lambda function is executed, a crash is generated since the variable no longer exists since function fun_a has already finished.

Message permanent page

— Https://pastebin.com/a4QsSn6H

It throws the following error with input as "123":
123
terminate called after throwing an instance of 'std::out_of_range'
what(): basic_string::at: __n (which is 18446744073709551615) >= this->size() (which is 3)
Aborted (core dumped)

Can anyone spot any kind of mistake?
Thanks!

Message permanent page

— C++ compiler errors are so cryptic. Hate it

— They are not

— They are for me

— I am still learning C++, bear with me man 😅

— Just saying 🙃

— Sure, no biggy