简体   繁体   中英

Simple Visual Studio console application does not start

I installed Visual Studio 2013 on my Windows 10 machine. To test the installation I wrote a simple program in C++:

#include <iostream>
using namespace std;

int main(){

    cout << "Size of char is: " << sizeof(char);

    cin.get();

    return 0;
}

It's embarrassing to post such a simple code here but the problem is as follows. The build process runs without errors or warnings. But when I start the program via Debug-Button, Visual Studio freezes. I also tried starting the .exe in cmd. The result is a blinking cursor in an empty line with no further reaction from the console. Can somebody tell me what's wrong? The Project Type in Visual Studio is empty visual c++ project.

Finally it works. As Peter M mentioned in his comment, the VS/Avast issue was the problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM