C语言程序能在C++环境下运行吗?

为什么这个程序不能运行?c:\documents and settings\yuanzuohui\my documents\visual studio 2005\projects\text1\text1\text1.cpp(7) : fatal error C1010: 在查找预编译头时遇到意外的文件结尾。是否忘记了向源中添加“#include "stdafx.h"”?

main()
{
printf("123");
getch();
}

加了还是不能运行:
#include<stdio.h>
main()
{
printf("123");

}

第1个回答  2007-11-21
能,C++相当于C的超集
第2个回答  2007-11-21
neng