Reputation: 25
Lately, when I make some changes in my C code, it isn't reflected - the compiler still runs the old version of my code. For instance. this print statement >>
printf("Enter a String: ");
It prints
Enter a String:
Change it to:
printf("Enter aaaaaaa String: ");
It still prints
Enter a String:
why is that? I am using the Code::Blocks IDE.
Upvotes: 3
Views: 2228
Reputation: 156
I also faced same kind of issue. The problem was that Anti virus is checking for viruses and it was taking too long. While closing the prior executable it was not closing that file properly. I had to close it by going to task manager find that exe and close that. Then run again, changes had been reflected.
Permanent Solution is: Go to Your Anti virus's Setting and in exception tab Set an exception for the path where you are saving your programmes.
Then antivirus will not scan that exe that is being made.
I hope it helps. It works for me...
Upvotes: 0
Reputation: 36401
This probably means that your new code isn't compiled/linked for some reason and the old version of the executable runs. Clean your project and rebuild.
Upvotes: 0
Reputation: 1323
When I face these kind of problems, I will examine my executable as below in Linux.
strings a.out | grep aaaaaaa
Enter aaaaaaa String:
This result will be displayed, if the aaaaaaa is present in your executable.
In your case, just try to simulate compilation error in source (#error). This is to ensure whether the file is compiling or not.
Upvotes: 2