Home > Back-end >  Why is this Program to run at the Program received signal SIGSEGV, Segmentation fault
Why is this Program to run at the Program received signal SIGSEGV, Segmentation fault

Time:11-19

CodePudding user response:

Suggest you debug a Segmentation fault is generally illegal access pointer simple look at the code you
Problem is likely in the days of the month () function parameters more than 12

CodePudding user response:

Why parameters exceed 12 will be wrong

CodePudding user response:

Is likely to be an array, it is recommended that check incoming days function in the month more than 13? This is the first problem;

In addition, there are also runyear function problem, lack of brackets ~
 if ((year %==0 400) | | (year % 4==0 & amp; & Year % 100!=0)) 

CodePudding user response:

I this a debug flash out of the whole devc++ directly, and added a parenthesis is wrong, so the incoming value?

CodePudding user response:

How it I also take a pointer, a pointer to access shouldn't visit place

CodePudding user response:

A mystery
  • Related