Author Topic: Settings causing strange error?  (Read 5118 times)

Offline Kat B

  • Multiple posting newcomer
  • *
  • Posts: 11
Settings causing strange error?
« on: July 19, 2010, 08:54:06 am »

I have two projects running the same workspace, and until this morning, everything worked well.  I would build and then run.

Now, for some reason, Project 1 cannot run basic code, but Project 2 can.

Is it possible that I have changed some sort of setting? Or something in the build settings? What could that be?

The code is: FILE * fp = fopen("test.txt", "a+");

Works a treat in Project 2, in Project 1 creates:

"The instruction at "0x7c9369da" referenced memory at "0x00000000". The memory could not be "read"/ Click on OK to terminate the program.

At this point I am at a complete loss and am looking at all options, including possible Code::Blocks settings.

So is there a setting I could have changed that could affect this?

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2875
Re: Settings causing strange error?
« Reply #1 on: July 19, 2010, 01:27:51 pm »
As Killerbot says:
Quote
hello, nice to see someone starting with C++.
However these forums are related to use of CB, it is not a general programming forum.
So you will have to look elsewhere, but let's give you some feedback though :

Your file probably failed to open. Always check that the file successfully opened.

Also read this:
http://wiki.codeblocks.org/index.php?title=Debugging_with_Code::Blocks

Offline Kat B

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: Settings causing strange error?
« Reply #2 on: July 20, 2010, 09:37:55 am »
That's a no, then :)

Thanks anyway. Thanks for the link to the debugger.