2013|10|11|12|
2014|01|02|03|04|05|06|07|08|09|10|11|12|
2015|01|02|03|04|05|06|07|08|09|10|11|12|
2016|01|02|03|04|05|06|07|08|09|10|11|12|
2017|01|02|03|04|05|06|07|08|09|10|11|12|
2018|01|02|03|04|05|06|07|08|09|10|11|12|
2019|01|02|03|04|05|06|07|08|09|10|11|12|
2020|01|02|03|04|05|06|07|08|09|10|11|12|
2021|01|02|03|04|05|06|07|08|09|10|11|12|
2022|01|02|03|04|05|06|07|08|09|10|11|12|
2023|01|02|03|04|05|06|07|08|09|10|11|12|
2024|01|02|03|04|05|

2014-07-04 "Did you make such a mistake? Now? Are you all right? Are you stupid? Do you kill yourself?" [長年日記]

Yesterday, I could delete a bug of my "100,000,000 person's simulator" that had made me the worst condition for this week.

Last night, I asked a junior colleague with saying "help me for just 30 seconds", and he had helped me for 30 min.

The reason of the bug left unknown, but he pointed out the problem of memory destroy.

After that, I noticed that I misunderstood how to use the function of reference call, instead of pointer call.

It was too shabby. I left the following code to regret what I had done.

#include 
 
void fun(int *a){
  *a = *a + 2;
}
 
int main()
{
  int b;
 
  b=100;
 
  fun(&b);
  
  printf("%d\n",b);
  
  return(0);
}

-----

This morning,

"A-kun, I am very sorry but I found my error. That was pointer reference."

"Are you talking about the code of yesterday?"

"I was off guard. Because I used the pointer itself. The function should have received as pointer of pointer."

"Um... It's a double pointer"

Without saying much, he seemed to have understood it in a moment.

-----

It is too much of being deplorable. When I noticed it, I really thought I should put my head in the noose.

"No. Please stop it really.

He seemed to worry with an earnest face seriously.

-----

And now,

"Did you make such a mistake? Now? Are you all right? Are you stupid? Do you kill yourself?"

I heard those voices from me.