I'm new to concurrency in C++. I just tried creating new thread and tried running it. But I'm getting memory fault(coredump) error.
Now able to find why it is causing memory fault. When I tried to debug using coredump created in gdb, I got this, but ont able to understand where the error is
Program terminated with signal 11, Segmentation fault. #0 0x0000000000603d20 in strcmp@@GLIBC_2.2.5 ()
#include<iostream>
#include<thread>
using namespace std;
void test(){
std::cout<<"hi fro thread";
}
int main(){
std::cout<<"hi fro main";
std::thread myThread(test);
myThread.join();
return 0;
}