Visual Studio 2013错误! ! ! [英] Visual studio 2013 error ! ! !

查看:80
本文介绍了Visual Studio 2013错误! ! !的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚在Windows 10上安装了Visual Studio 2013,并运行了一个代码为Hello World!我收到了下一条消息:

程序退出时代码为0(0x0)。

任何人都可以帮我这个消息在Visual Studio 2013中?



我尝试过:



我在互联网上搜索但是没有工作。

I just installed Visual Studio 2013 on Windows 10 and I run a code with "Hello World!" and I've got the next message:
The program has exited with code 0 (0x0).
Can anyone help me with this message in Visual Studio 2013 ?

What I have tried:

I've search on the internet but is not working.

推荐答案

如果这是你的应用程序在运行时给你的,那不是错误:零表示成功程序终止。非零是一个错误代码。



如果没有你想做的其他事情,那么有两种可能性:

1)你没有正确编码。如果没有看到你实际编写,编译和执行的代码,我们无法帮助你解决这个问题!

2)它完全符合你的预期,但你的计算机速度太快了。如果您的代码是这样的:

If that is what your app gave you when you ran it, that's not an error: zero indicates a successful program termination. Non zero is an error code.

If it doesn't do what else you wanted, then there are 2 possibilities:
1) You didn't code it right. We can't help you fix this without seeing the code you actually wrote, compiled, and executed!
2) It did exactly what you expected, but your computer is too fast. If your code was this:
static void main()
   {
   Console.WriteLine("Hello world");
   }

然后程序可以打开控制台窗口,打印消息,退出应用程序,然后关闭控制台窗口,直到你发现它已经打开...

尝试在主方法的结束大括号之前添加此行:

Then the program could well open the console window, print the message, exit the app, and close the console window before you even noticed it was open...
Try adding this line before the closing curly bracket of the main method:

Console.ReadLine();

它将停止直到你退出前按ENTER键。

And it will stop until you press ENTER before it exits.


事实上你的代码退出,你没有机会看到它的输出。

为了看到输出您可以暂停执行,例如让您的程序等待用户输入,例如

As matter of fact your code exits and you have no chance to see its output.
In order to see the output you might pause the execution, for instance making your program wait for user input, e.g.
#include <iostream>
using namespace std;

int main()
{
	cout << "\n Hello world!" << endl;
    cin.get();
	return 0;
}


第一:代码是用C ++编写的,写的是正确的。



First: The code was written in C++ and is written right.

#include <iostream>
using namespace std;

int main()
{
	cout << "\n Hello world!" << endl;
	return 0;
}





第二,就像我在编译代码时说的那样:

程序退出时代码为0(0x0)。

且控制台窗口不打印消息。



And second, like I said when I compile the code I get:
The program has exited with code 0 (0x0).,
and the console windows doesn't print the message.


这篇关于Visual Studio 2013错误! ! !的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆