Segmentation fault (core dumped) when trying to solve problem set

I’m trying to solve the Caesar pset in the Harvard CS50 course, and I think I’m mostly on the right way, but I just started getting the error "Segmentation fault (core dumped)". Im still super new to coding, which is why i was having a bit of trouble figuring out the problem, when I was… Read More Segmentation fault (core dumped) when trying to solve problem set

Can std::future cause coredump without get or wait

void func() { std::future<int> fut = std::async(std::launch::async, []{ std::this_thread::sleep_for(std::chrono::seconds(10)); return 8; }); return; } Let’s say that I have such a function. An object fut of std::future<int> is initialized with a std::async job, which will return an integer in the future. But the fut will be immediately released after the function func returns. Is there… Read More Can std::future cause coredump without get or wait