When I give the size of an array as global variable the code is giving exit code -1073741571
Here’s the code
However if I use the value of MAXN directly… the code works fine…
What is it happening?
When I give the size of an array as global variable the code is giving exit code -1073741571
Here’s the code
However if I use the value of MAXN directly… the code works fine…
What is it happening?
*why is it happening
no it’s still giving the same exit code…
working fine in my side.
pls check
Yes…but on my machine…it’s giving that exit code…is it due the compiler flags? I have this
…
not sure, but logic is correct
g++ -ulimit ? is this cause ulimit causing that ?
…
yeah that might be creating some issue.
I updated the flags to this : !g++ -Wall -Wextra -Wno-unused-result -std=c++17 -O2 -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC
but it’s still giving the same exit code would you see if something’s wrong there
…
take help of stackoverflow, i am not good with linux commands.
ur logic and code both are correct. the issue is with ur system only
Thank you There was an issue with ulimit…increasing the stack size worked.
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.