Author Topic: Code::Blocks runs same program twice  (Read 4596 times)

tiagocosta

  • Guest
Code::Blocks runs same program twice
« on: September 27, 2014, 08:19:00 am »
Hello,

I have a problem with my Code::Blocks and I can't find an answer for it anywhere.

Whenever I run a code that I wrote on Code::Blocks, it runs the program twice...
I tryed everything to make it stop, but nothing worked...
Does anyone know how can I stop this?

Thank you very much!

Online ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5915
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Code::Blocks runs same program twice
« Reply #1 on: September 27, 2014, 10:23:31 am »
Can't understand your problem if you don't tell us the details.
We need some steps to reproduce your issue.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline Sleck

  • Single posting newcomer
  • *
  • Posts: 2
Re: Code::Blocks runs same program twice
« Reply #2 on: October 08, 2014, 08:59:32 am »
I have the same problem.

I notice it only happens when I have inputs such as scanf/fgets in the program.

I'm using Windows 7. I've tried running the same program on my Windows Vista and had no problem.

Online ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5915
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Code::Blocks runs same program twice
« Reply #3 on: October 08, 2014, 09:03:32 am »
@Sleck
As I said before:
Can't understand your problem if you don't tell us the details.
We need some steps to reproduce your issue.
We can't help you unless you give more details.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline Sleck

  • Single posting newcomer
  • *
  • Posts: 2
Re: Code::Blocks runs same program twice
« Reply #4 on: October 08, 2014, 09:27:35 am »
Well, can you like specific what details you want?

It's not a code issue. I already said I've tried the same program on Vista and there was no problem.

Online ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5915
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Code::Blocks runs same program twice
« Reply #5 on: October 08, 2014, 09:44:18 am »
Steps. (your operations, your source code) Since we don't know how to reproduce this issue.
Result: it could be: screen shot, other kinds of log messages or descriptions.
C::B version?
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.