如何在Visual Studio 2017中解决此问题 [英] How can I solve this problem in visual studio 2017

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

问题描述

#include< stdio.h>

#include< conio.h>

int main()

{



printf(你好世界!);

返回0;



} < br $>


/*

#include<stdio.h>
#include<conio.h>
int main()
{

printf("hello world!");
return 0;

}

/*

'DataStructure-Lab1.exe' (Win32): Loaded 'C:\Users\HP\source\repos\DataStructure-Lab1\Debug\DataStructure-Lab1.exe'. Symbols loaded.
'DataStructure-Lab1.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ntdll.dll'. Cannot find or open the PDB file.
'DataStructure-Lab1.exe' (Win32): Loaded 'C:\Windows\SysWOW64\kernel32.dll'. Cannot find or open the PDB file.
'DataStructure-Lab1.exe' (Win32): Loaded 'C:\Windows\SysWOW64\KernelBase.dll'. Cannot find or open the PDB file.
'DataStructure-Lab1.exe' (Win32): Loaded 'C:\Windows\SysWOW64\vcruntime140d.dll'. Cannot find or open the PDB file.
'DataStructure-Lab1.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ucrtbased.dll'. Cannot find or open the PDB file.
'DataStructure-Lab1.exe' (Win32): Loaded 'C:\Windows\SysWOW64\kernel.appcore.dll'. Cannot find or open the PDB file.
'DataStructure-Lab1.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcrt.dll'. Cannot find or open the PDB file.
'DataStructure-Lab1.exe' (Win32): Loaded 'C:\Windows\SysWOW64\rpcrt4.dll'. Cannot find or open the PDB file.
'DataStructure-Lab1.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sspicli.dll'. Cannot find or open the PDB file.
'DataStructure-Lab1.exe' (Win32): Loaded 'C:\Windows\SysWOW64\cryptbase.dll'. Cannot find or open the PDB file.
'DataStructure-Lab1.exe' (Win32): Loaded 'C:\Windows\SysWOW64\bcryptprimitives.dll'. Cannot find or open the PDB file.
'DataStructure-Lab1.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sechost.dll'. Cannot find or open the PDB file.
The thread 0x171c has exited with code 0 (0x0).
The thread 0x3cac has exited with code 0 (0x0).
The program '[4056] DataStructure-Lab1.exe' has exited with code 0 (0x0).

* /



我尝试了什么:



我试图重建解决方案然后调试但是在我看到结果

*/

What I have tried:

I tried to rebuild the solution and then debug but it exit just before I can see the result

推荐答案

最简单的方法是包含 getchar()调用一些等待字符输入的额外代码。
The easist way is to include a getchar() call with some extra code which waits for a character input.


没有问题。您的 main 函数会向操作系统返回零,并将其报告为退出代码。一切正常。
There is no problem. Your main function returns zero to the operating system, which is reported as the exit code. Everything is working correctly.


你的控制台应用程序正常工作(正如 Richard 所指出的那样),它

  • starts
  • 输出欢迎信息(可能不是:你忘了换行)
  • 终止
You console application is working correctly (as pointed out by Richard), it
  • starts
  • outputs the welcome message (maybe not: you forgot a newline)
  • terminates
#include <stdio.h>
int main()
{
  printf("Hello World!\n");
  getchar(); // waits for user input
  return 0;
}


这篇关于如何在Visual Studio 2017中解决此问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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