怎么在VS2008里编写C语言程序

是不是在文件-》新建》项目->VC++里选择文win32控制台程序啊。我的怎么老是在调试的时候不出现结果啊
而且新建了之后总是出现这个
#include "stdafx.h"

int _tmain(int argc, _TCHAR* argv[])
{
return 0;
}
有没有像VC6.0里的那样有VOID MIAN()的那一类型啊
调试运行的时候总是说文件路径不存在
还有就是有没有关于使用VS2008的一些教程啊,本人是菜鸟。要是有就请发到[email protected]吧,多谢

_tmain 就是现在的入口函数啦,返回值默认变成了int,这不重要,返回的就是退出代码了
之所以 多了_t 是因为默认使用了unicode宽字符集, 不像以前那样默认是asc字符集, unicode字符集好处非常明显,在不同语言的系统下不会乱码
,如今写程序也是极力推荐使用unicode的,同时ascII与unicode处理字符窜时所用的函数都不同,多看教程吧,编译设置中有 字符集的设置,想改可以改回来

至于新版2008的教程真的不好找,大多书也没有讲unicode的事情,
所以看是看经典类的书籍吧,我也是因为如此,即装了VC6.0 ,又装了2008,主学的是C#了

电驴找了下,这个教程应该不错,要好好学习还是直接买本好书去吧
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’ll 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 <iostream> 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—you would add #include directives for any other sys-
temheaders that you need in this file. While you are learning ISO/ANSI C++, you won’t 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

这一段载自某书,表示在stdafx.h中有tchar也就是宽字符集定义的头文件tchar.h的包含,如果你不需要,则去掉这个包含, 去掉_t
目前网上能找到的VC++2008的书都是英文的。。。。
温馨提示:答案为网友推荐,仅供参考
第1个回答  2009-11-29
说实在的,初学c语言,写控制台程序用VS2008绝对不是个好主意,编译太慢了,推荐使用MinGW Developer Studio,用的是GCC编译器,小巧方便。
第2个回答  2009-12-02
不是的,文件-新建-项目-visual C++\空项目,命个名。然后打开那个项目,视图-解决方案管理器,在项目的“源文件”右键添加-新建项,代码-C++文件,然后再名称输入以.c为扩展名的c文件就可以了
第3个回答  2009-11-29

裁了半天,希望对你有帮助

本回答被提问者采纳
第4个回答  2009-12-01
新建一个.cpp文件前先建立一个win32控制台应用程序的项目,这个在新建--项目上会有,在写好文件后将已经保存的.cpp文件添加到你新建的工程上去,然后compile,生成.exe后点击“开始执行(调试选项中)”,就会看到那个黑框啦!你编译出来的文件当然要在你建的工程文件中寻找了,最后就是要重新编写的的时候需要将原先的.cpp文件从项目中排出,这样才能保证一个工程中不出现两个以上的main(),恩恩,就是这样吧!
相似回答