Quantcast
Channel: Visual C forum
Viewing all articles
Browse latest Browse all 15302

Console application task doesn't close

$
0
0

When I run a program (code is below) on Visual studio express, it executes fine (a window opens with the output and closes), but then VS freezes and I have to terminate it using the task manager, then it restarts and I can't run the project again - I get a LNK error. Turns out that the console application process (ConsoleApplication.exe) is still open! I can see it in the "processes" tab in the task manager, but trying to terminate it doesn't work. Only rebooting the computer.

I found online someone claiming that a Microsoft update KB978037 to Windows (I have Windows 7) could have caused this, but I can't find such an update on my machine (I looked in control panel-->uninstall programs-->view installed updates).

I am very frustrated with this, does anyone have any idea what could be the cause of this?

#include <stdio.h>

int main()
{

int i;
int sum=0;

for (i = 1; i < 1000; i++)
{
    if (i % 3 == 0 || i % 5 == 0)
    {
        sum += i;
    }

}
printf("%d", sum);
return 0;
}



Viewing all articles
Browse latest Browse all 15302

Trending Articles