鱼C论坛

 找回密码
 立即注册
查看: 4181|回复: 2

编辑了一个简单的问候程序结果。。。

[复制链接]
发表于 2012-11-4 22:17:19 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
#include "stdafx.h"
#include "iostream.h"
void PrintHelloFunction()
{
        cout<<"大家好,我的名字叫程序!"<<'\n';
}
int main(int argc,char* argv[])
{PrintHelloFunction();
return 0;
}


这是编辑代码
--------------------Configuration: hellofuntion - Win32 Debug--------------------
Compiling...
hellofuntion.c
c:\documents and settings\updatususer\桌面\hellofuntion\hellofuntion.c(1) : fatal error C1083: Cannot open include file: 'stdafx.h': No such file or directory
Error executing cl.exe.

hellofuntion.obj - 1 error(s), 0 warning(s)
提示头文件错误了!!!怎么错了,为什么会错?麻烦大婶们解释下下
小甲鱼最新课程 -> https://ilovefishc.com
 楼主| 发表于 2012-11-6 18:45:51 | 显示全部楼层
擦,没有大神出来关照下下啊
小甲鱼最新课程 -> https://ilovefishc.com
发表于 2012-11-6 20:05:42 | 显示全部楼层
两种解决方案:
1.去掉#include "stdafx.h"这行
2.项目选项里勾选预编译头选项
小甲鱼最新课程 -> https://ilovefishc.com
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2025-11-16 03:57

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表