VS2008 编写C语言程序按F5黑框一闪而过 win7 64位系统,vs2008编写C语言程序报错:生成“...

\u600e\u4e48\u5728VS2008\u91cc\u7f16\u5199C\u8bed\u8a00\u7a0b\u5e8f

_tmain \u5c31\u662f\u73b0\u5728\u7684\u5165\u53e3\u51fd\u6570\u5566\uff0c\u8fd4\u56de\u503c\u9ed8\u8ba4\u53d8\u6210\u4e86int\uff0c\u8fd9\u4e0d\u91cd\u8981\uff0c\u8fd4\u56de\u7684\u5c31\u662f\u9000\u51fa\u4ee3\u7801\u4e86
\u4e4b\u6240\u4ee5 \u591a\u4e86_t \u662f\u56e0\u4e3a\u9ed8\u8ba4\u4f7f\u7528\u4e86unicode\u5bbd\u5b57\u7b26\u96c6\uff0c \u4e0d\u50cf\u4ee5\u524d\u90a3\u6837\u9ed8\u8ba4\u662fasc\u5b57\u7b26\u96c6\uff0c unicode\u5b57\u7b26\u96c6\u597d\u5904\u975e\u5e38\u660e\u663e\uff0c\u5728\u4e0d\u540c\u8bed\u8a00\u7684\u7cfb\u7edf\u4e0b\u4e0d\u4f1a\u4e71\u7801
\uff0c\u5982\u4eca\u5199\u7a0b\u5e8f\u4e5f\u662f\u6781\u529b\u63a8\u8350\u4f7f\u7528unicode\u7684\uff0c\u540c\u65f6ascII\u4e0eunicode\u5904\u7406\u5b57\u7b26\u7a9c\u65f6\u6240\u7528\u7684\u51fd\u6570\u90fd\u4e0d\u540c\uff0c\u591a\u770b\u6559\u7a0b\u5427\uff0c\u7f16\u8bd1\u8bbe\u7f6e\u4e2d\u6709 \u5b57\u7b26\u96c6\u7684\u8bbe\u7f6e\uff0c\u60f3\u6539\u53ef\u4ee5\u6539\u56de\u6765


\u81f3\u4e8e\u65b0\u72482008\u7684\u6559\u7a0b\u771f\u7684\u4e0d\u597d\u627e\uff0c\u5927\u591a\u4e66\u4e5f\u6ca1\u6709\u8bb2unicode\u7684\u4e8b\u60c5\uff0c
\u6240\u4ee5\u770b\u662f\u770b\u7ecf\u5178\u7c7b\u7684\u4e66\u7c4d\u5427\uff0c\u6211\u4e5f\u662f\u56e0\u4e3a\u5982\u6b64\uff0c\u5373\u88c5\u4e86VC6.0 \uff0c\u53c8\u88c5\u4e862008\uff0c\u4e3b\u5b66\u7684\u662fC#\u4e86

\u7535\u9a74\u627e\u4e86\u4e0b\uff0c\u8fd9\u4e2a\u6559\u7a0b\u5e94\u8be5\u4e0d\u9519\uff0c\u8981\u597d\u597d\u5b66\u4e60\u8fd8\u662f\u76f4\u63a5\u4e70\u672c\u597d\u4e66\u53bb\u5427
http://www.verycd.com/topics/2773169/





The Application Wizard has generated the stdafx.h header file as part of the project, and if you take a
look at the code in there, you\u2019ll see there are two further #include directives for standard library header
files stdio.h and tchar.h. The old-style header stdio.h is for standard I/O and was used before the cur-
rent ISO/ANSI standard for C++; this covers the same functionality as the header. tchar.h
is a Microsoft-specific header file defining text functions. The idea is that stdafx.h should define a set of
standard system include files for your project\u2014you would add #include directives for any other sys-
temheaders that you need in this file. While you are learning ISO/ANSI C++, you won\u2019t be using either
of the headers that appear in stdafx.h, which is one reason for not using the default file generation
capability provided by the Application Wizard

\u8fd9\u4e00\u6bb5\u8f7d\u81ea\u67d0\u4e66\uff0c\u8868\u793a\u5728stdafx.h\u4e2d\u6709tchar\u4e5f\u5c31\u662f\u5bbd\u5b57\u7b26\u96c6\u5b9a\u4e49\u7684\u5934\u6587\u4ef6tchar.h\u7684\u5305\u542b\uff0c\u5982\u679c\u4f60\u4e0d\u9700\u8981\uff0c\u5219\u53bb\u6389\u8fd9\u4e2a\u5305\u542b\uff0c \u53bb\u6389_t
\u76ee\u524d\u7f51\u4e0a\u80fd\u627e\u5230\u7684VC++2008\u7684\u4e66\u90fd\u662f\u82f1\u6587\u7684\u3002\u3002\u3002\u3002

\u6211\u521a\u521a\u7f16\u8bd1\u7684\u65f6\u5019\u4e5f\u51fa\u73b0\u8fc7\u8fd9\u4e2a\u95ee\u9898\uff0c\u521a\u641c\u5230\u7684\u7b54\u6848\uff0c\u8bd5\u4e86\u4e0b\uff0c\u597d\u7528\uff0c\u4f60\u53ef\u4ee5\u8bd5\u8bd5\u770b\u3002
\u6b65\u9aa4\u5982\u4e0b\uff1a1\u3001\u8fd0\u884cVS2008\u5b89\u88c5\u7a0b\u5e8f\u3002
2\u3001\u5728\u201c\u9009\u62e9\u8981\u5b89\u88c5\u7684\u529f\u80fd\u201d\u8fd9\u4e00\u6b65\u65f6\uff0c\u4f9d\u6b21\u5c55\u5f00\u201c\u8bed\u8a00\u5de5\u5177\u201d\u2014\u2014\u201cVisual C++\u201d\u2014\u2014\u201cVisual C++ \u5de5\u5177\u201d\uff0c\u52fe\u9009\u201cWin32 \u5de5\u5177\u201d\u4e00\u9879\u3002
3\u3001\u70b9\u201c\u66f4\u65b0\u201d\u6309\u94ae\u3002
\u6b64\u65f6\u5b89\u88c5\u7a0b\u5e8f\u5c06\u5f00\u59cb\u7ef4\u62a4\u64cd\u4f5c\uff0c\u5b8c\u6210\u540e\u5c06\u89e3\u51b3\u751f\u6210rc.exe\u65f6\u51fa\u9519\u7684\u95ee\u9898\u3002
PS.\u5982\u679c\u8fd8\u4e0d\u884c\uff0c\u5c31\u628a\u201c\u8bed\u8a00\u5de5\u5177\u201d\u2014\u2014\u201cVisual C++\u201d\u4e0b\u9762\u6240\u6709\u6ca1\u6709\u9009\u7684\u90fd\u9009\u4e0a\u5728\u66f4\u65b0\u3002

光标移动到main函数的最后的那个 } 上,按F9,会出现红点,然后F5。执行到红点它就会停下来

(黑窗口可以通过任务栏上的图标点出来



调试==》"开始执行(不调试)(H) Ctrl+F5"。就不会闪屏了。
或直接按住:Ctrl+F5

在主程序最后返回前加一行 getchar(); 就OK了。

F5 是调试 调试结束就关闭了 ..
ctrl+F5 是运行不调试 这个就不会关闭了 ..

可以在最后加上一句
system("pause");

扩展阅读:c++简单程序实例 ... c语言必背100代码 ... c++教程 ... 怎么用vs写程序 ... 一个简单的c++程序 ... c++编程入门自学 ... vs怎么编写c语言 ... visual c++2008 ... 用c语言编写的程序 ...

本站交流只代表网友个人观点,与本站立场无关
欢迎反馈与建议,请联系电邮
2024© 车视网