0

I am trying to make a school project, which doesn't have to be like this, but I think it will impress my teacher.

We are a group of 5 people, with 5 different projects, and I was wondering if it's possible to run all our projects from a singular project.

For example, if the program asks me "which project?" I type in "5" and runs the fifth project and so on for the rest.

I was just really curious if it's possible.

MickeyMoise
  • 259
  • 2
  • 13
  • If you still want to be able to run these executables separately, then you'd probably want to write something like `if (input == "5") system("path/to/other/executable");`. – Osyotr Mar 05 '22 at 22:12
  • When you say "run different project files", do you mean have it run different applications (.exe) when you hit the "Run" button? Do you mean have Visual studio load different C++ project files (.vcxproj)? Something else? – Joe Mar 05 '22 at 22:13
  • It's also possible to have multiple executables in a single solution and switch between them with "Set startup item" – Osyotr Mar 05 '22 at 22:15
  • @Joe i want to get the source code from my classmates, put it in a project in visual studio (because some of them use code blocks), and have a separate project from which i run all their projects, hope it made sense – MickeyMoise Mar 05 '22 at 22:15
  • @Genjutsu i would prefer something thats done within the code, that i type in the console "5" and runs the fifth project – MickeyMoise Mar 05 '22 at 22:17
  • You have to move their code into separate libraries and link your executable to these libraries. – Osyotr Mar 05 '22 at 22:22
  • That's essentially what a *solution* is in Visual Studio. It is one collection of multiple projects. Each solution has a single current "startup project" that runs when you Debug. – Joe Mar 05 '22 at 22:24
  • @Genjutsu how would i go about doing that? what do i need to search for – MickeyMoise Mar 06 '22 at 11:47
  • @Joe i was looking for something that i could write in the code, so i can run a project from the solution within the console, that would open like a new console or something similar to that (https://stackoverflow.com/questions/17703721/how-to-execute-another-exe-from-a-c-program-in-windows) is sort of what i want to do – MickeyMoise Mar 06 '22 at 11:54

0 Answers0