Author Topic: How can I choose which file I want to run (SOLVED)  (Read 4092 times)

Offline undostres2411

  • Single posting newcomer
  • *
  • Posts: 3
How can I choose which file I want to run (SOLVED)
« on: May 06, 2016, 03:32:28 pm »
Hello everyone,

Whenever I open two projects at the same time, the program doesn't let me run the first one. I'll give you an example:



In this case, I have two different projects with two different files, nave.cpp and main.cpp. Since main.cpp is the one I opened the second, whenever I run one of the two .cpp the CMD shows the .exe related to main.cpp. So if I want to run nave.cpp, I can't.

How can I choose which one of the two files I want to run?

Thanks in advance! ;)
« Last Edit: May 06, 2016, 04:42:40 pm by undostres2411 »

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5913
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: How can I choose which file I want to run
« Reply #1 on: May 06, 2016, 03:48:36 pm »
In the project browser tree, just "active" the project by context menu. This can make the active project switch.
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 undostres2411

  • Single posting newcomer
  • *
  • Posts: 3
Re: How can I choose which file I want to run
« Reply #2 on: May 06, 2016, 04:42:24 pm »
Thank you! Problem solved.