0

I'm using visual studio 2013 express. I have a program that uses recursion, after multiple edits and compiles. The compiler now compiles the program without error but the program does not run in foreground, instead 3 instances of same program run in the background. Task manager cannot stop the programs and i can no longer click and edit on visual studio(but is still responsive according to task manager). This code works on other systems.I have tried repairing visual studio, deleting debug folder, restarting my PC.

image showing build succeeded and 3 instances of program:
image showing build succeeded and 3 instances of program

Cœur
  • 37,241
  • 25
  • 195
  • 267
Maaz Jamal
  • 43
  • 5
  • Du you use the compiler flag subsystem:console? http://stackoverflow.com/questions/7316433/difference-between-console-subsystemconsole-and-windows-subsystemwindows – Captain Giraffe Nov 21 '15 at 10:54
  • Upon checking linker setting project->your_project_name properties->Linker->all options->subsystem I found subsystem was set to nothing. upon setting it to subsystem:console it did work. I do have main function, so why would it not do this by default? Even in other projects it was set to nothing,but luckily i didnt get any problems. – Maaz Jamal Nov 21 '15 at 11:14
  • @Captain Giraffe turn your comment into an answer and i will mark it as the answer. Thanks a lot. Can't upvote you tho :( , low rep – Maaz Jamal Nov 21 '15 at 11:15

1 Answers1

0

You might have missed to use the linker flag SUBSYSTEM:CONSOLE. MSDN link

Captain Giraffe
  • 14,407
  • 6
  • 39
  • 67