code :- https://onlinegdb.com/cUzeCsqc6
bool segment[n - m + 1];
// this line is causing segmentation fault . why?
code :- https://onlinegdb.com/cUzeCsqc6
bool segment[n - m + 1];
// this line is causing segmentation fault . why?
hi @akashagarwal1321
if u comment out all part except this bool segment[n - m + 1]; part then code is running fine… its not causing any error… something else is causing the error… try to figure out that…
But if i run it on vscode after adding a line - cout << “error1” ; before bool segment[n - m + 1]; and cout <<" error" ; after it.
In the output “error1” gets printed but error does not gets printed.
Hi @akashagarwal1321
Just match the code again with video lecture… If still there is any difficulty do let me know…
Yes, Thank you.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.